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!)
A157480 a(n) = least prime p such that p + prime(n) is a square. 5

%I #12 Oct 01 2013 21:35:29

%S 2,13,11,2,5,3,19,17,2,7,5,107,23,101,2,11,5,3,257,29,71,2,17,11,3,43,

%T 41,37,467,31,17,13,7,5,47,173,167,1601,2,23,17,719,5,3,59,701,113,2,

%U 29,347,23,17,83,5,67,61,131,53,47,43,41,31,17,13,11,7,569,239,53,227,47,2

%N a(n) = least prime p such that p + prime(n) is a square.

%H Zak Seidov, <a href="/A157480/b157480.txt">Table of n, a(n) for n = 1..10000</a>

%e The difference between prime 3 and the square 16 is 13 which is prime and in the sequence.

%t Table[p=Prime[n];b=Ceiling[Sqrt[p]];While[!PrimeQ[x=b^2-p],b++];x,{n,72}]

%o (PARI) g(n)= c=0;forprime(x=2,n,for(k=1,n^2,if(issquare(x+k)&&isprime(k),

%o print1(k",");c++;break)));c

%K nonn

%O 1,1

%A _Cino Hilliard_, Mar 01 2009

%E Better definition and Mma program from _Zak Seidov_, Mar 14 2013

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 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)