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!)
A172216 Smallest k such that sum of digits of prime(n)^k is prime. 1

%I #9 Sep 08 2022 08:45:50

%S 1,1,1,1,1,3,2,5,1,1,7,2,1,1,1,2,5,1,1,6,2,2,1,1,4,1,4,2,2,1,2,1,1,1,

%T 2,1,1,4,6,1,1,2,1,1,1,1,3,1,1,1,5,6,1,4,4,1,1,2,2,1,1,4,3,1,1,1,1,1,

%U 8,2,1,1,2,1,1,5,2,1,1,1,8,1,4,2,3,1,1,2,1,1,1,4,1,8,3,2,6,2,3,6,2,1,10,8,1

%N Smallest k such that sum of digits of prime(n)^k is prime.

%C For all n, prime(n)^0 = 1 has nonprime sum of digits 1.

%C a(n) = 1 iff prime(n) is in A046704, an additive prime. a(n) = 1 iff n is in A075177.

%e prime(1) = 2; 2^1 = 2 has prime sum of digits 2. Hence a(1) = 1.

%e prime(6) = 13; 13^1 = 13 has nonprime sum of digits 4; 13^2 = 169 has nonprime sum of digits 16; 13^3 = 2197 has prime sum of digits 19. Hence a(6) = 3.

%t sdp[n_]:=Module[{k=1},While[!PrimeQ[Total[IntegerDigits[Prime[n]^k]]], k++]; k]; Array[sdp,110] (* _Harvey P. Dale_, Apr 13 2014 *)

%o (Magma) S:=[]; for n in [1..105] do j:=1; while not IsPrime(&+Intseq(NthPrime(n)^j)) do j+:=1; end while; Append(~S, j); end for; S;

%Y Cf. A046704, A075177, A172035.

%K base,nonn

%O 1,6

%A _Klaus Brockhaus_, Jan 29 2010

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 September 13 22:05 EDT 2024. Contains 375910 sequences. (Running on oeis4.)