login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A109619 Smallest prime p such that 2n+p is the square of a prime, or 0 if no such prime exists. 0
2, 5, 3, 17, 0, 13, 11, 0, 7, 5, 3, 97, 23, 0, 19, 17, 0, 13, 11, 0, 7, 5, 3, 73, 71, 0, 67, 113, 0, 61, 59, 0, 103, 53, 0, 97, 47, 0, 43, 41, 0, 37, 83, 0, 31, 29, 0, 73, 23, 0, 19, 17, 0, 13, 11 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

Many of the zeros can be understood: Let p = q^2-2*n, for q prime.  q <= 3 only leads to positive p for n <= 4. For n > 4, q > 3 so q^2 mod 3 = 1, and if n = 2 mod 3 then p = 0 mod 3, so p is either 3 or a multiple of 3.  Thus for n > 4 with n = 2 mod 3, a(n) = 3 or 0, and instances of 3 should become increasingly rare at large n.  Not all zeros are of this form: when 2*n is a square, k^2, then (q^2-2*n)=(q-k)*(q+k) and p cannot be prime unless q-k=1. n=72=(12^2/2) is the first case for which a(n) = 0 and n is not congruent to 2 mod 3.  Possibly all zeros fall into one of these two categories (all those for n<=10^5 do). [D. S. McNeil, 24 November 2010]

EXAMPLE

For n=4, we find that 17+2*4=25=5^2 and no smaller prime than 17 works, so a(4)=17. For n=5, the 2 mod 3 argument applies and a(5)=3 or 0; but 3+2*5=13 which is not a squared prime, so a(5)=0.

CROSSREFS

Sequence in context: A035334 A002565 A063703 * A087228 A077216 A058357

Adjacent sequences:  A109616 A109617 A109618 * A109620 A109621 A109622

KEYWORD

nonn

AUTHOR

John W. Layman (layman(AT)math.vt.edu), Aug 01 2005

EXTENSIONS

Extended and correctness proved by D. S. McNeil (mcneil(AT)hku.hk), Nov 24 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 14 10:43 EST 2012. Contains 205614 sequences.