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.

A100500 a(n) = prime(3n-2) + prime(3n-1) + prime(3n).

Original entry on oeis.org

10, 31, 59, 97, 131, 173, 211, 251, 301, 329, 395, 439, 487, 533, 581, 633, 689, 731, 789, 829, 883, 941, 1015, 1061, 1119, 1169, 1229, 1285, 1331, 1381, 1433, 1493, 1553, 1645, 1703, 1757, 1807, 1849, 1915, 1959, 2011, 2075, 2155, 2215, 2269, 2329, 2417, 2471
Offset: 1

Views

Author

Jun Mizuki (suzuki32(AT)sanken.osaka-u.ac.jp), Nov 23 2004

Keywords

Examples

			a(1) = 10 = 2 + 3 + 5 = prime(1) + prime(2) + prime(3).
a(2) = 31 = 7 + 11 + 13 = prime(4) + prime(5) + prime(6).
a(3) = 59 = 17 + 19 + 23 = prime(7) + prime(8) + prime(9).
		

Crossrefs

Programs

  • Magma
    [&+[NthPrime(n+k): k in [0..2]]: n in [1..1000 by 3]]; // Vincenzo Librandi, Apr 23 2011
    
  • Mathematica
    Total/@Partition[Prime[Range[150]],3] (* Harvey P. Dale, May 25 2011 *)
  • Python
    from sympy import prime, nextprime
    def a(n):
        p = prime(3*n - 2); q = nextprime(p); r = nextprime(q)
        return p + q + r
    print([a(n) for n in range(1, 49)]) # Michael S. Branicky, Oct 31 2021
    
  • SageMath
    def A100500(n): return sum(nth_prime(3*n-j) for j in range(3))
    [A100500(n) for n in range(1,61)] # G. C. Greubel, Apr 03 2023

Formula

a(n) = A034961(3n-2). - R. J. Mathar, Apr 20 2009, Jun 17 2009