|
|
A123128
|
|
Add n to the n-th difference between consecutive primes.
|
|
1
|
|
|
2, 4, 5, 8, 7, 10, 9, 12, 15, 12, 17, 16, 15, 18, 21, 22, 19, 24, 23, 22, 27, 26, 29, 32, 29, 28, 31, 30, 33, 44, 35, 38, 35, 44, 37, 42, 43, 42, 45, 46, 43, 52, 45, 48, 47, 58, 59, 52, 51, 54, 57, 54, 63, 60, 61, 62, 59, 64, 63, 62, 71, 76, 67, 66, 69, 80, 73, 78, 71, 74, 77
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
FORMULA
|
a(n) = n + (prime(n+1) - prime(n)) = n + A001223(n).
a(n) = prime(n+1) - A014689(n). (End)
|
|
MATHEMATICA
|
With[{nn=80}, Total/@Thread[{Differences[Prime[Range[nn]]], Range[nn-1]}]] (* Harvey P. Dale, Jun 02 2014 *)
|
|
PROG
|
(PARI) for(n=1, 100, print1(prime(n+1)-prime(n)+n, ", "))
(Magma) [n + NthPrime(n+1) - NthPrime(n): n in [1..80]]; // G. C. Greubel, Aug 03 2021
(Sage) [n + nth_prime(n+1) - nth_prime(n) for n in (1..80)] # G. C. Greubel, Aug 03 2021
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
Herman Jamke (hermanjamke(AT)fastmail.fm), Sep 30 2006
|
|
STATUS
|
approved
|
|
|
|