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.

A076273 a(0) = 1, a(1) = 2; for n>1, a(n) = prime(n)+prime(n-1)-1.

Original entry on oeis.org

1, 2, 4, 7, 11, 17, 23, 29, 35, 41, 51, 59, 67, 77, 83, 89, 99, 111, 119, 127, 137, 143, 151, 161, 171, 185, 197, 203, 209, 215, 221, 239, 257, 267, 275, 287, 299, 307, 319, 329, 339, 351, 359, 371, 383, 389, 395, 409, 433, 449, 455, 461, 471, 479, 491, 507, 519, 531
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 04 2002

Keywords

Comments

Least m such that A076272(m) > A076272(m-1) for n>0; a(0)=1.
A076272(a(k)+j) = A008578(k) for k>0 and 0<=j < A075527(k-1).

Crossrefs

Cf. A001043.

Programs

  • Mathematica
    nxt[{a_,b_}]:={a+1,Prime[a+1]+Prime[a]-1}; Join[{1},Transpose[ NestList[ nxt,{1,2},60]][[2]]] (* or *) Join[{1,2},Total/@Partition[Prime[ Range[ 60]],2,1]-1] (* Harvey P. Dale, Jun 12 2012 *)
  • PARI
    a(n)=if(n<1,1,if(n==1,2,prime(n)+prime(n-1)-1)) \\ Lambert Klasen, Jan 14 2005; corrected by Michel Marcus, Nov 05 2023

Formula

a(n) = A001043(n-1)-1, n>1. - R. J. Mathar, Jun 04 2020

Extensions

Simpler description from Vladeta Jovovic, Mar 29 2003
More terms from Lambert Klasen (lambert.klasen(AT)gmx.de), Jan 14 2005