login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

REFERENCES

An old ARML problem asked for the smallest n>0 such that a(n) does not exist.

LINKS

T. D. Noe, Table of n, a(n) for n = 0..10000

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: A209138 A051297 A078317 * A074747 A128248 A224901

Adjacent sequences:  A105013 A105014 A105015 * A105017 A105018 A105019

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 13 22:53 EDT 2020. Contains 336473 sequences. (Running on oeis4.)