(Translated by https://www.hiragana.jp/)
The On-Line Encyclopedia of Integer Sequences (OEIS)
login

Revision History for A066027

(Bold, blue-underlined text is an addition; faded, red-underlined text is a deletion.)

Showing all changes.
Sum of digits of n minus product of digits of n is prime.
(history; published version)
#10 by Alois P. Heinz at Sat Jun 16 19:33:41 EDT 2018
STATUS

proposed

approved

#9 by Jon E. Schoenfield at Sat Jun 16 19:14:15 EDT 2018
STATUS

editing

proposed

#8 by Jon E. Schoenfield at Sat Jun 16 19:14:13 EDT 2018
LINKS

Harry J. Smith, <a href="/A066027/b066027.txt">Table of n, a(n) for n = 1,...,1000</a>

EXAMPLE

a(11)=112 because 1 + 1 + 2 = 4 and , 2*1*1 = 2 , and 4 - 2 =2 and 2 , which is prime. [corrected by _Harry J. Smith_, Nov 07 2009]

PROG

(PARI) ProdD(x)= { local(p=1); while (x>9 && p>0, p*=x%10; x\=10); return(p*x) } SumD(x)= { local(s=0); while (x>9, s+=x%10; x\=10); return(s + x) } { n=0; for (m=1, 10^9, if (isprime(SumD(m) - ProdD(m)), write("b066027.txt", n++, " ", m); if (n==1000, return)) ) } [From _\\ _Harry J. Smith_, Nov 07 2009]

EXTENSIONS

EXAMPLE corrected by Harry J. Smith, Nov 07 2009

STATUS

approved

editing

#7 by Russ Cox at Sat Mar 31 10:32:39 EDT 2012
AUTHOR

_Enoch Haga (Enokh(AT)comcast.net), _, Dec 11 2001

Discussion
Sat Mar 31
10:32
OEIS Server: https://oeis.org/edit/global/789
#6 by Russ Cox at Fri Mar 30 17:24:34 EDT 2012
PROG

(PARI) ProdD(x)= { local(p=1); while (x>9 && p>0, p*=x%10; x\=10); return(p*x) } SumD(x)= { local(s=0); while (x>9, s+=x%10; x\=10); return(s + x) } { n=0; for (m=1, 10^9, if (isprime(SumD(m) - ProdD(m)), write("b066027.txt", n++, " ", m); if (n==1000, return)) ) } [From _Harry J. Smith (hjsmithh(AT)sbcglobal.net), _, Nov 07 2009]

EXTENSIONS

EXAMPLE corrected by _Harry J. Smith (hjsmithh(AT)sbcglobal.net), _, Nov 07 2009

Discussion
Fri Mar 30
17:24
OEIS Server: https://oeis.org/edit/global/133
#5 by N. J. A. Sloane at Thu Nov 11 07:34:06 EST 2010
LINKS

Harry J. Smith, <a href="/A066027/b066027.txt">Table of n, a(n) for n=1,...,1000</a>

KEYWORD

easy,nonn,base,new

#4 by N. J. A. Sloane at Tue Jun 01 03:00:00 EDT 2010
LINKS

Harry J. Smith, <a href="b066027.txt">Table of n, a(n) for n=1,...,1000</a>

EXAMPLE

a(1011)=112 because 1+1+2=4 and 2*1*1=2 and 4-2=2 and 2 is prime

PROG

(PARI) ProdD(x)= { local(p=1); while (x>9 && p>0, p*=x%10; x\=10); return(p*x) } SumD(x)= { local(s=0); while (x>9, s+=x%10; x\=10); return(s + x) } { n=0; for (m=1, 10^9, if (isprime(SumD(m) - ProdD(m)), write("b066027.txt", n++, " ", m); if (n==1000, return)) ) } [From Harry J. Smith (hjsmithh(AT)sbcglobal.net), Nov 07 2009]

KEYWORD

easy,nonn,base,new

EXTENSIONS

EXAMPLE corrected by Harry J. Smith (hjsmithh(AT)sbcglobal.net), Nov 07 2009

#3 by N. J. A. Sloane at Fri Feb 27 03:00:00 EST 2009
EXAMPLE

a(10)=112 because 1+1+2=4 and 2*1*1=2, and 4-2=2, and 2 is prime

KEYWORD

easy,nonn,base,new

#2 by N. J. A. Sloane at Sun Feb 20 03:00:00 EST 2005
KEYWORD

easy,nonn,base,new

AUTHOR

Enoch Haga (Enokh(AT)aolcomcast.comnet), Dec 11 2001

#1 by N. J. A. Sloane at Fri May 16 03:00:00 EDT 2003
NAME

Sum of digits of n minus product of digits of n is prime.

DATA

20, 30, 50, 70, 101, 102, 104, 106, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 131, 140, 141, 151, 160, 161, 171, 181, 191, 200, 201, 203, 205, 209, 210, 211, 230, 250, 290, 300, 302, 304, 308, 311, 320, 340, 380, 401, 403, 407, 409, 410

OFFSET

1,1

EXAMPLE

a(10)=112 because 1+1+2=4 and 2*1*1=2, and 4-2=2, and 2 is prime

CROSSREFS
KEYWORD

easy,nonn,base

AUTHOR

Enoch Haga (Enokh(AT)aol.com), Dec 11 2001

STATUS

approved