cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A123128 Add n to the n-th difference between consecutive primes.

This page as a plain text file.
%I A123128 #20 Sep 08 2022 08:45:28
%S A123128 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,
%T A123128 28,31,30,33,44,35,38,35,44,37,42,43,42,45,46,43,52,45,48,47,58,59,52,
%U A123128 51,54,57,54,63,60,61,62,59,64,63,62,71,76,67,66,69,80,73,78,71,74,77
%N A123128 Add n to the n-th difference between consecutive primes.
%H A123128 Harvey P. Dale, <a href="/A123128/b123128.txt">Table of n, a(n) for n = 1..1000</a>
%H A123128 A. Frank & P. Jacqueroux, <a href="http://www.paulcooijmans.com/others/intcontest.pdf">International Contest</a>, 2001. Item 20.
%F A123128 a(n) = n + (prime(n+1) - prime(n)) = n + A001223(n).
%F A123128 From _G. C. Greubel_, Aug 03 2021: (Start)
%F A123128 a(n) = A014690(n) - prime(n) = A095116(n+1) - prime(n).
%F A123128 a(n) = prime(n+1) - A014689(n). (End)
%t A123128 With[{nn=80},Total/@Thread[{Differences[Prime[Range[nn]]],Range[nn-1]}]] (* _Harvey P. Dale_, Jun 02 2014 *)
%o A123128 (PARI) for(n=1,100,print1(prime(n+1)-prime(n)+n,","))
%o A123128 (Magma) [n + NthPrime(n+1) - NthPrime(n): n in [1..80]]; // _G. C. Greubel_, Aug 03 2021
%o A123128 (Sage) [n + nth_prime(n+1) - nth_prime(n) for n in (1..80)] # _G. C. Greubel_, Aug 03 2021
%Y A123128 Cf. A000040 (primes), A001223, A014689, A014690, A095116.
%K A123128 nonn
%O A123128 1,1
%A A123128 Herman Jamke (hermanjamke(AT)fastmail.fm), Sep 30 2006