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.

A086169 Sum of the first n twin prime pairs.

Original entry on oeis.org

8, 20, 44, 80, 140, 224, 344, 488, 692, 908, 1184, 1484, 1844, 2228, 2624, 3080, 3560, 4100, 4664, 5288, 5984, 6824, 7688, 8612, 9656, 10796, 11996, 13232, 14516, 15836, 17456, 19100, 20756, 22472, 24236, 26276, 28340, 30440, 32564, 34748, 37052
Offset: 1

Views

Author

Cino Hilliard, Aug 25 2003

Keywords

Examples

			For n = 4 we have twin prime pairs (3,5) (5,7) (11,13) (17,19) and 3+5+5+7+11+13+17+19 = 80
		

Programs

  • Mathematica
    Accumulate[Total/@Select[Partition[Prime[Range[300]],2,1],#[[2]]-#[[1]] == 2&]] (* Harvey P. Dale, Nov 09 2019 *)
  • PARI
    addnexttwin(n)= { s=0; for(x=1,n, if(prime(x+1)-prime(x)==2,s=s+prime(x+1)+prime(x); print1(s",")) ) }