login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A316604 Replacing each digit d in decimal expansion of n with d^2 yields a new prime when done recursively three times. 2
11, 101, 131, 133, 1013, 2111, 2619, 3173, 3301, 4111, 5907, 8463, 9101, 10033, 10111, 12881, 13833, 14021, 14821, 15443, 16771, 17501, 17831, 18621, 21519, 21567, 28609, 29309, 31133, 31233, 33131, 41621, 42621, 44181, 44421, 44669, 45921, 52707, 55847, 59023 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
2619 is a term because replacing each digit d by d^2, recursively three times, a prime number is obtained: 2619 -> 436181 (prime); 436181 -> 169361641 (prime); 169361641 -> 13681936136161 (prime).
3173 is a term because replacing each digit d by d^2, recursively three times, a prime number is obtained: 3173 -> 91499 (prime); 91499 -> 811168181 (prime); 811168181 -> 6411136641641 (prime).
MATHEMATICA
A316604 = {}; Do[ a=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[n]^2)]]; b=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[a]^2)]]; c=FromDigits[Flatten[IntegerDigits /@ (IntegerDigits[b]^2)]]; If[PrimeQ[a] && PrimeQ[b] && PrimeQ[c], AppendTo[A316604, n]], {n, 100000}]; A316604
PROG
(PARI) replace_digits(n) = my(d=digits(n), s=""); for(k=1, #d, s=concat(s, d[k]^2)); eval(s)
is(n) = my(x=n, i=0); while(1, x=replace_digits(x); if(!ispseudoprime(x), return(0), i++); if(i==3, return(1))) \\ Felix Fröhlich, Jul 08 2018
CROSSREFS
Sequence in context: A062696 A113654 A066592 * A208362 A159613 A062332
KEYWORD
nonn,base
AUTHOR
K. D. Bajpai, Jul 08 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 | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 01:35 EDT 2024. Contains 371964 sequences. (Running on oeis4.)