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!)
A105016 Smallest a(n) such that a(n)^2 - n is a positive prime, or 0 if no such a(n) exists. 2
0, 2, 2, 4, 3, 4, 3, 3, 5, 4, 9, 4, 5, 4, 4, 14, 0, 6, 5, 6, 5, 8, 5, 5, 11, 6, 7, 8, 9, 6, 7, 6, 7, 6, 6, 8, 7, 12, 7, 10, 9, 8, 7, 12, 7, 8, 7, 7, 11, 0, 9, 8, 9, 8, 11, 12, 13, 8, 9, 8, 11, 8, 8, 10, 9, 12, 13, 18, 9, 10, 9, 10, 13, 12, 9, 16, 9, 10, 9, 9, 11, 10, 21, 10, 11, 12, 13, 10, 15, 10 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
An old ARML problem asked for the smallest n>0 such that a(n) does not exist.
LINKS
EXAMPLE
a(8) = 5 because 5^2 - 8 = 17 is the smallest square that gives a prime difference.
a(16) = 0 because if x^2 - 16 is prime, then a prime equals (x+4)(x-4), which is impossible.
MATHEMATICA
Table[s = Sqrt[n]; If[IntegerQ[s], If[PrimeQ[(s + 1)^2 - n], k = s + 1, k = 0], k = Ceiling[s]; While[! PrimeQ[k^2 - n], k++]]; k, {n, 0, 100}] (* T. D. Noe, Apr 17 2011 *)
CROSSREFS
Cf. A075555 for the primes = a(n)^2 - n.
Sequence in context: A371409 A338756 A078317 * A074747 A128248 A347659
KEYWORD
nonn
AUTHOR
Joshua Zucker, Mar 31 2005
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 00:26 EDT 2024. Contains 371264 sequences. (Running on oeis4.)