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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A129726 a(n) = a(n-1)+2+prime(n)-prime(n-1). 1

%I

%S 2,5,9,13,19,23,29,33,39,47,51,59,65,69,75,83,91,95,103,109,113,121,

%T 127,135,145,151,155,161,165,171,187,193,201,205,217,221,229,237,243,

%U 251,259,263,275,279,285,289,303,317,323,327

%N a(n) = a(n-1)+2+prime(n)-prime(n-1).

%C The sequence shows 36 primes in the first 100 entries; the largest run of primes in these has length 4.

%H Vincenzo Librandi, <a href="/A129726/b129726.txt">Table of n, a(n) for n = 1..1000</a>

%F a(n) = a(n-1)+A001223(n-1)+2.

%p A129726 := proc(n)

%p option remember;

%p if n = 1 then

%p 2 ;

%p else

%p procname(n-1)+2+ithprime(n)-ithprime(n-1) ;

%p end if;

%p end proc:

%p seq(A129726(n),n=1..80) ; # _R. J. Mathar_, Feb 01 2014

%t P[1] = 2; P[n_] := P[n] = P[n - 1] + Prime[n] - Prime[n - 1] + 2; Table[P[n], {n, 1, 50}]

%t RecurrenceTable[{a[1]==2,a[n]==a[n-1]+2+Prime[n]-Prime[n-1]},a,{n,50}] (* _Harvey P. Dale_, Apr 02 2018 *)

%K nonn,easy

%O 1,1

%A _Roger L. Bagula_, May 12 2007

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 19 22:14 EDT 2019. Contains 325168 sequences. (Running on oeis4.)