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!)
A226533 a(n) = smallest integer m such that m^n is a sum of two successive primes. 1
5, 6, 2, 150, 22, 82, 2, 258, 70, 30, 42, 18, 2, 12, 262, 58, 460, 36, 552, 24, 318, 344, 450, 54, 274, 88, 36, 92, 90, 188, 554, 20, 404, 700, 240, 6, 136, 262, 578, 222, 2182, 276, 162, 60, 142, 326, 176, 198, 930, 1116 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
EXAMPLE
5^1 = 5 = 2 + 3, 6^2 = 36 = 17 + 19, 2^3 = 8 = 3 + 5, 150^4 =506250000 = 253124999 + 253125001.
MATHEMATICA
a[n_] := For[m = 2, True, m++, p = m^n/2 // NextPrime[#, -1]&; q = NextPrime[p]; If[p + q == m^n, Print["a(", n, ") = ", m]; Return[m]]]; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jun 10 2013 *)
tsp[n_]:=Module[{m=1, t}, t=m^n; While[NextPrime[t/2]+NextPrime[t/2, -1]! = t, m++; t=m^n]; m]; Array[tsp, 50] (* Harvey P. Dale, Nov 10 2014 *)
PROG
(PARI) a(n)=if(n==1, return(5)); my(m=1, M, p); while(1, M=m++^n; p=precprime(M/2); ispseudoprime(M-p) && M-p==nextprime(M/2) && return(m)) \\ Charles R Greathouse IV, Jun 10 2013
CROSSREFS
a(2) = 6 = A074924(1), a(3) = 2 = A074925(1). Cf. A001043, A001597.
Sequence in context: A072733 A018851 A260463 * A011499 A242813 A106599
KEYWORD
nonn
AUTHOR
Zak Seidov, Jun 09 2013
EXTENSIONS
a(41)-a(50) from Jean-François Alcover, Jun 10 2013
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 March 29 04:23 EDT 2024. Contains 371264 sequences. (Running on oeis4.)