login
Nonprimes such that it takes exactly 4 iterations of reverse-and-add digits to generate a prime.
2

%I #10 Jul 13 2014 17:07:51

%S 10031,10040,10190,10231,10390,10441,10480,10541,10721,10921,10970,

%T 11021,11030,11180,11221,11380,11431,11470,11531,11711,11911,11960,

%U 12020,12170,12370,12460,12521,12701,12901,12950,13010,13160,13201,13360,13450,13511,13601

%N Nonprimes such that it takes exactly 4 iterations of reverse-and-add digits to generate a prime.

%e Reversing digits and adding starting with 11021 -> 23032 -> 46064 -> 92128 -> 174257 and 174257 is a prime while the prior numbers are not primes.

%t p4Q[n_] := Module[{lst = NestList[# + FromDigits[Reverse[IntegerDigits[#]]] &, n, 4]}, NoneTrue[Most[lst], PrimeQ] && PrimeQ[Last[lst]]]; Select[Range[100000], p4Q](* using NoneTrue function from Mathematica version 10 *)

%Y Cf. A245208, A245210.

%K nonn,base

%O 0,1

%A _Harvey P. Dale_, Jul 13 2014