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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A138479 a(n) = smallest prime p such that 2n + p^2 is another prime, or 0 if no such prime exists. 10
3, 3, 5, 3, 3, 5, 3, 5, 5, 3, 3, 7, 0, 3, 7, 3, 3, 5, 3, 7, 5, 3, 5, 5, 3, 3, 5, 0, 3, 7, 3, 3, 29, 0, 3, 5, 3, 5, 5, 3, 5, 5, 0, 3, 7, 3, 3, 19, 3, 3, 5, 3, 5, 7, 0, 5, 5, 0, 3, 11, 3, 5, 5, 3, 3, 5, 0, 11, 5, 3, 3, 7, 0, 3, 7, 0, 3, 5, 3, 11, 7, 3, 5, 5, 3, 3, 5, 0, 7, 7, 3, 3, 5, 3, 3, 7, 0, 11, 5, 0 (list; graph; refs; listen; history; internal format)
OFFSET

1,1

COMMENTS

For numbers n such that a(n) = 0 see A138685..

LINKS

Eric Weisstein's World of Mathematics, Near-Square Prime

EXAMPLE

11=2+3^2 hence a(1)=3

13=4+3^2 hence a(2)=3

31=6+5^2 hence a(3)=5

17=8+3^2 hence a(4)=3

19=10+3^2 hence a(5)=3

37=12+5^2 hence a(6)=5

23=14+3^2 hence a(7)=3

41=16+5^2 hence a(8)=5

43=18+5^2 henec a(9)=5

29=20+3^2 hence a(10)=3

31=22+3^2 hence a(11)=3

73=24+7^2 hence a(12)=7

MATHEMATICA

a = {}; Do[ p = 0; While[ (! PrimeQ[ 2*n + Prime[ p + 1 ]2 ]) && (p < 1000), p++ ]; If[ p < 1000, AppendTo[ a, Prime[ p + 1 ] ], AppendTo[ a, 0 ] ], {n, 1, 150} ]; a (*Artur Jasinski, Mar 26 2008*)

a[n_]:=If[Mod[n, 3]!=1, (For[m=1, !PrimeQ[2n+Prime[m]^2], m++ ]; Prime[m]), If[ !PrimeQ[2n+9], 0, 3]]; Table[a[n], {n, 100}] - Farideh Firoozbakht (mymontain(AT)yahoo.com), Mar 28 2008

CROSSREFS

Cf. A002373, A020481, A049613, A059324 (?).

Sequence in context: A204903 A054906 A020483 * A202106 A136019 A063714

Adjacent sequences:  A138476 A138477 A138478 * A138480 A138481 A138482

KEYWORD

nonn,hard

AUTHOR

Philippe LALLOUET (philip.lallouet(AT)orange.fr), Mar 20 2008

EXTENSIONS

More terms from Artur Jasinski (grafix(AT)csl.pl) and Farideh Firoozbakht (mymontain(AT)yahoo.com), Mar 26 2008

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 20:38 EST 2012. Contains 205663 sequences.