login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A073131 a(n) = prime(prime(n+1)) - prime(prime(n)). 5
2, 6, 6, 14, 10, 18, 8, 16, 26, 18, 30, 22, 12, 20, 30, 36, 6, 48, 22, 14, 34, 30, 30, 48, 38, 16, 24, 12, 18, 92, 30, 34, 24, 62, 18, 42, 48, 24, 40, 32, 24, 66, 18, 30, 16, 80, 112, 24, 14, 24, 28, 24, 74, 24, 48, 54, 18, 46, 36, 24, 66, 114, 36, 18, 18, 122, 48, 72, 10, 30 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The first differences of A006450. Conjecture: a(n) < log^3 A006450(n) for sufficiently large n. - Thomas Ordowski, Mar 22 2015
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A006450(n+1) - A006450(n). - Thomas Ordowski, Mar 22 2015
G.f.: (Sum_{ k>=1 } x^pi(pi(k))) -2, with pi(k) the prime counting function. - Benedict W. J. Irwin, Jun 13 2016
EXAMPLE
n=10, prime(11) - prime(10) = 31 - 29 = 2, a(10) = prime(31) - prime(29) = 127 - 109 = 18.
MAPLE
seq(ithprime(ithprime(n+1))-ithprime(ithprime(n)), n = 1..80); # G. C. Greubel, Oct 20 2019
MATHEMATICA
Table[Prime[Prime[n+1]]-Prime[Prime[n]], {n, 80}]
PROG
(PARI) a(n) = prime(prime(n+1)) - prime(prime(n)); \\ Michel Marcus, Jul 01 2016
(PARI) a(n, p=prime(n))=my(q=nextprime(p+1), r=prime(p), s, total); for(i=1, q-p, s=nextprime(r+1); total+=s-r; r=s); total; \\ Charles R Greathouse IV, Dec 30 2018
(Magma) [NthPrime(NthPrime(n+1)) - NthPrime(NthPrime(n)): n in [1..80]]; // G. C. Greubel, Oct 20 2019
(Sage) [nth_prime(nth_prime(n+1)) - nth_prime(nth_prime(n)) for n in (1..80)] # G. C. Greubel, Oct 20 2019
CROSSREFS
Sequence in context: A119312 A309415 A051398 * A206490 A343315 A321302
KEYWORD
nonn
AUTHOR
Labos Elemer, Jul 16 2002
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 16:08 EDT 2024. Contains 371794 sequences. (Running on oeis4.)