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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A058043 nextprime(n^2)-prevprime(n^2). 8
2, 4, 4, 6, 6, 6, 6, 4, 4, 14, 10, 6, 4, 4, 6, 10, 14, 8, 4, 4, 8, 18, 6, 12, 4, 6, 14, 14, 20, 14, 10, 4, 10, 6, 6, 6, 8, 12, 4, 24, 18, 14, 16, 10, 16, 6, 12, 12, 26, 16, 8, 16, 8, 14, 16, 22, 10, 22, 14, 8, 14, 22, 6, 10, 8, 10, 16, 24, 14, 12, 10, 10, 6, 16, 30, 12, 10, 18, 24, 10 (list; graph; refs; listen; history; internal format)
OFFSET

2,1

EXAMPLE

6^2=36 is immediately preceded and followed by 31 and 37, of which 6 is the difference.

MAPLE

[seq(nextprime(i^2)-prevprime(i^2), i=2..1000)];

MATHEMATICA

Table[n2=n^2; (NextPrime[n2]-NextPrime[n2, -1]), {n, 2, 100}] (*From Vladimir Joseph Stephan Orlovsky, Mar 09 2011*)

PROG

(PARI) A058043(n) = nextprime(n^2)-prime(primepi(n^2)) [From Michael B. Porter (michael_b_porter(AT)yahoo.com), Feb 09 2010]

CROSSREFS

Sequence in context: A057697 A074325 A058249 * A162550 A191682 A113724

Adjacent sequences:  A058040 A058041 A058042 * A058044 A058045 A058046

KEYWORD

nonn

AUTHOR

Labos E. (labos(AT)ana.sote.hu), Nov 17 2000

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 17 19:13 EST 2012. Contains 206085 sequences.