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.

A024525 a(n) = 1^2 + prime(1)^2 + prime(2)^2 + ... + prime(n)^2.

Original entry on oeis.org

1, 5, 14, 39, 88, 209, 378, 667, 1028, 1557, 2398, 3359, 4728, 6409, 8258, 10467, 13276, 16757, 20478, 24967, 30008, 35337, 41578, 48467, 56388, 65797, 75998, 86607, 98056, 109937, 122706, 138835, 155996, 174765, 194086, 216287, 239088, 263737, 290306, 318195, 348124
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A024450.
Partial sums of A280076.

Programs

  • Magma
    [1] cat [n le 1 select 5 else Self(n-1) + NthPrime(n)^2: n in [1..80]]; // G. C. Greubel, Jan 30 2025
    
  • Mathematica
    Join[{1},Accumulate[Prime[Range[40]]^2]+1] (* Harvey P. Dale, Oct 24 2015 *)
  • Python
    def A024525(n):
        if n<2: return (1,5)[n]
        else: return A024525(n-1) + nth_prime(n)**2
    print([A024525(n) for n in range(81)]) # G. C. Greubel, Jan 30 2025

Formula

a(n) = 1 + A024450(n), for n >= 1.
a(n) = a(n-1) + prime(n)^2, with a(0) = 1, a(1) = 5. - G. C. Greubel, Jan 30 2025

Extensions

Corrected by Harvey P. Dale, Oct 24 2015