login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A117737 Numbers such that the (positive) difference between the sum of the digits and the product of the digits is a primenumber. 0
20, 24, 25, 27, 29, 30, 33, 34, 35, 37, 38, 42, 43, 45, 47, 49, 50, 52, 53, 54, 56, 57, 59, 65, 67, 70, 72, 73, 74, 75, 76, 78, 79, 83, 87, 92, 94, 95, 97, 101, 102, 104, 106, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 125, 126, 128, 131, 133, 140 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

EXAMPLE

97 is in the sequence because (1)the sum of its digits is 16,(2)the product of its digits is 63 and the difference between 16 and 63 is 47, which is a prime.

PROG

(PARI) sudig(i, suOrmul)= { local(nshft, resul) ; nshft = i ; resul = nshft % 10 ; nshft = nshft \ 10 ; while(nshft>0, if(suOrmul==0, resul += nshft % 10, resul *= nshft % 10 ) ; nshft \= 10 ; ) ; return(resul) ; } { for(n=10, 150, summ = sudig(n, 0) ; mull = sudig(n, 1) ; if( isprime(summ-mull), print1(n, ", ") ) ; ) ; } - R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 21 2006

CROSSREFS

Cf. A000040.

Sequence in context: A199360 A199585 A093716 * A062908 A111323 A114843

Adjacent sequences:  A117734 A117735 A117736 * A117738 A117739 A117740

KEYWORD

base,nonn

AUTHOR

Luc Stevens (lms022(AT)yahoo.com), Apr 14 2006

EXTENSIONS

More terms from R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Apr 21 2006

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 16 05:55 EST 2012. Contains 205860 sequences.