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.

This page as a plain text file.
%I A024525 #17 Jan 31 2025 04:30:42
%S A024525 1,5,14,39,88,209,378,667,1028,1557,2398,3359,4728,6409,8258,10467,
%T A024525 13276,16757,20478,24967,30008,35337,41578,48467,56388,65797,75998,
%U A024525 86607,98056,109937,122706,138835,155996,174765,194086,216287,239088,263737,290306,318195,348124
%N A024525 a(n) = 1^2 + prime(1)^2 + prime(2)^2 + ... + prime(n)^2.
%H A024525 G. C. Greubel, <a href="/A024525/b024525.txt">Table of n, a(n) for n = 0..5000</a>
%F A024525 a(n) = 1 + A024450(n), for n >= 1.
%F A024525 a(n) = a(n-1) + prime(n)^2, with a(0) = 1, a(1) = 5. - _G. C. Greubel_, Jan 30 2025
%t A024525 Join[{1},Accumulate[Prime[Range[40]]^2]+1] (* _Harvey P. Dale_, Oct 24 2015 *)
%o A024525 (Magma)
%o A024525 [1] cat [n le 1 select 5 else Self(n-1) + NthPrime(n)^2: n in [1..80]]; // _G. C. Greubel_, Jan 30 2025
%o A024525 (Python)
%o A024525 def A024525(n):
%o A024525     if n<2: return (1,5)[n]
%o A024525     else: return A024525(n-1) + nth_prime(n)**2
%o A024525 print([A024525(n) for n in range(81)]) # _G. C. Greubel_, Jan 30 2025
%Y A024525 Cf. A024450.
%Y A024525 Partial sums of A280076.
%K A024525 nonn
%O A024525 0,2
%A A024525 _Clark Kimberling_
%E A024525 Corrected by _Harvey P. Dale_, Oct 24 2015