The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A316982 Numbers n such that replacing each digit d in the decimal expansion of n with d^3 yields a prime each time, when done recursively three times. 1
 11, 31, 101, 173, 1307, 1873, 10111, 11923, 12209, 14767, 20357, 20729, 21149, 22003, 22151, 29261, 43681, 43891, 52033, 52211, 55231, 58121, 65011, 70027, 70399, 80569, 100087, 101111, 101401, 102079, 102113, 120091, 151931, 163669, 172001, 200501, 201113, 203831 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Harvey P. Dale, Table of n, a(n) for n = 1..235 (* Terms up to 2500000. *) EXAMPLE 173 is a term because replacing each digit d by d^3, recursively three times, a prime number is obtained: 173 -> 134327 (prime); 134327 -> 12764278343 (prime); 12764278343 -> 18343216648343512276427 (prime). 1873 is a term because replacing each digit d by d^3, recursively three times, a prime number is obtained: 1873 -> 151234327 (prime); 151234327 -> 1125182764278343 (prime); 1125182764278343 -> 11812515128343216648343512276427 (prime). MATHEMATICA A316982 = {}; Do[a=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[n]^3)]]; b=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[a]^3)]]; c=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[b]^3)]]; If[PrimeQ[a] && PrimeQ[b] && PrimeQ[c], AppendTo[A316982, n]], {n, 300000}]; A316982 (* or *) c[n_] := FromDigits@ Flatten@ IntegerDigits[IntegerDigits[n]^3]; Select[Range[204000], PrimeQ[x = c@#] && PrimeQ[y = c@x] && PrimeQ@c@y &] (* _Giovanni Resta_, Jul 18 2018 *) p3[n_]:=Rest[NestList[FromDigits[Flatten[IntegerDigits/@(IntegerDigits[#]^3)]]&, n, 3]]; Select[Range[205000], AllTrue[p3[#], PrimeQ]&] (* The program uses the AllTrue function from Mathematica version 10 *) (* _Harvey P. Dale_, Aug 11 2019 *) PROG (PARI) eva(n) = subst(Pol(n), x, 10) replace_digits(n) = my(d=digits(n), e=[]); for(x=1, #d, my(f=digits(d[x]^3)); if(f==[], e=concat(e, [0]), for(y=1, #f, e=concat(e, f[y])))); eva(e) is(n) = my(x=n, i=0); while(i < 3, x=replace_digits(x); if(!ispseudoprime(x), break, i++)); i >= 3 \\ _Felix FrÃ¶hlich_, Oct 24 2018 CROSSREFS Cf. A048385, A048390, A048393, A316604. A004022 is a subsequence. Sequence in context: A299782 A027847 A068841 * A192246 A124296 A223388 Adjacent sequences:  A316979 A316980 A316981 * A316983 A316984 A316985 KEYWORD nonn,base AUTHOR _K. D. Bajpai_, Jul 18 2018 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified February 21 00:34 EST 2020. Contains 332086 sequences. (Running on oeis4.)