login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A245210
Nonprimes such that it takes exactly 5 iterations of reverse-and-add digits to generate a prime.
2
1001320, 1001720, 1002220, 1004420, 1005520, 1005710, 1005910, 1006120, 1007420, 1008710, 1009220, 1009510, 1009610, 1011220, 1011620, 1012120, 1014320, 1015420, 1015610, 1015810, 1016020, 1017320, 1018610, 1019120, 1019410, 1019510, 1021120, 1021520
OFFSET
0,1
EXAMPLE
Reversing and adding starting with 1005710 -> 1180711 -> 2351522 -> 4603054 -> 9106118 -> 17222137 and 17222137 is prime while the prior numbers are not primes.
MATHEMATICA
p5Q[n_]:=Module[{lst=NestList[#+FromDigits[Reverse[ IntegerDigits[#]]]&, n, 5]}, NoneTrue[Most[lst], PrimeQ]&&PrimeQ[Last[lst]]]; Select[ Range[ 3000000], p5Q] (* using NoneTrue function from Mathematica version 10 *)
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Harvey P. Dale, Jul 13 2014
STATUS
approved