_Cino Hilliard (hillcino368(AT)hotmail.com), _, Mar 01 2009
Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
_Cino Hilliard (hillcino368(AT)hotmail.com), _, Mar 01 2009
editing
approved
Better definition and Mma program from Zak Seidov, Mar 14 2013
approved
editing
editing
approved
The differences between the primes and the next squares are a(n) = least prime p such that p + prime(n) is a square.
It is appropriate to add a counter to the program to ensure a square is found for all primes <= n. Here we set n^2 as the difference upper bound. This appears to be high but with no loss in efficiency since we break out of the loop when the first square is found. This partial listing was generated for primes < 1000. Notice that 1601 would have been missed had we set the difference upper bound to 1000.
Or, least prime p such that p + prime(n) is a square. - Zak Seidov, Mar 14 2013~
Better definition from Zak Seidov, Mar 14 2013
proposed
editing
editing
proposed
Or, least prime p such that p + prime(n) is a square. - Zak Seidov, Mar 14 2013~
Zak Seidov, <a href="/A157480/b157480.txt">Table of n, a(n) for n = 1..10000</a>
Table[p=Prime[n]; b=Ceiling[Sqrt[p]]; While[!PrimeQ[x=b^2-p], b++]; x, {n, 72}]
approved
editing
reviewed
approved
proposed
reviewed
editing
proposed