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!)
A046432 2 steps needed to reach a prime under "Sum of digits raised to its digits' powers" procedure. 3

%I #25 Sep 08 2022 08:44:56

%S 3,69,96,123,132,203,213,222,230,231,302,312,320,321,334,343,433,447,

%T 456,465,469,474,477,496,546,564,566,577,645,649,654,656,665,689,694,

%U 698,744,747,757,774,775,777,869,896,946,964,968,986,1022,1038,1048

%N 2 steps needed to reach a prime under "Sum of digits raised to its digits' powers" procedure.

%C The sequence is infinite because the numbers of the form m = 111...111 with 10^(p-1) digits, p prime, are terms. - _Marius A. Burtea_, Oct 27 2019

%H Harvey P. Dale, <a href="/A046432/b046432.txt">Table of n, a(n) for n = 1..1001</a>

%e a(n)=69 -> 6^6 + 9^9 = 387467145 is composite but 3^3 + 8^8 + 7^7 + 4^4 + 6^6 + 7^7 + 1^1 + 4^4 + 5^5 = 18474623 is prime.

%t sdp[n_]:=Module[{idn=IntegerDigits[n]/.{0->1}},Total[#^#&/@idn]]; Select[ Range[ 1100],Rest[PrimeQ[NestList[sdp,#,2]]]=={False,True}&] (* _Harvey P. Dale_, Nov 10 2011 *)

%o (Magma) f:=func<n| &+[a[i]^a[i]:i in [1..#a]] where a is Intseq(n) >; [k:k in [1..1050] |not IsPrime(f(k)) and IsPrime(f(f(k))) ]; // _Marius A. Burtea_, Oct 27 2019

%Y Cf. A046431.

%K nonn,base

%O 1,1

%A _Patrick De Geest_, Jul 15 1998

%E Offset changed to 1 by _Georg Fischer_, Oct 27 2019

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 24 04:14 EDT 2024. Contains 371918 sequences. (Running on oeis4.)