Logo

Greetings from The On-Line Encyclopedia of Integer Sequences!

Hints

Search: id:A138479
Displaying 1-1 of 1 results found. page 1
     Format: long | short | internal | text      Sort: relevance | references | number      Highlight: on | off
A138479 a(n) = smallest prime p such that 2n + p^2 is another prime, or 0 if no such prime exists. +0
11
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; listen)
OFFSET

1,1

COMMENT

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: A013606 A054906 A020483 this_sequence A136019 A063714 A113965

Adjacent sequences: A138476 A138477 A138478 this_sequence 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

page 1

Search completed in 0.002 seconds

Lookup | Welcome | Find friends | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
More pages | Superseeker | Maintained by N. J. A. Sloane (njas@research.att.com)

Last modified November 30 13:13 EST 2009. Contains 167758 sequences.


AT&T Labs Research