[go: up one dir, main page]

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!)
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
A. Frank & P. Jacqueroux, International Contest, 2001. Item 20.
FORMULA
a(n) = n + (prime(n+1) - prime(n)) = n + A001223(n).
From G. C. Greubel, Aug 03 2021: (Start)
a(n) = A014690(n) - prime(n) = A095116(n+1) - prime(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
Sequence in context: A330424 A057168 A087711 * A057064 A340781 A328105
KEYWORD
nonn
AUTHOR
Herman Jamke (hermanjamke(AT)fastmail.fm), Sep 30 2006
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 August 29 15:03 EDT 2024. Contains 375517 sequences. (Running on oeis4.)