OFFSET
1,1
COMMENTS
For a guide to related sequences, see A204892.
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000
EXAMPLE
a(1) = s(2) - s(1) = 9 - 4 = 5;
a(2) = s(3) - s(1) = 25 - 4 = 21;
a(3) = s(3) - s(2) = 25 - 9 = 16;
a(4) = s(4) - s(1) = 49 - 4 = 45.
MATHEMATICA
(See the program at A204916.)
PROG
(Python)
from math import isqrt
from sympy import prime, primerange
def aupton(terms):
sqps = [p*p for p in primerange(1, prime(isqrt(2*terms)+1)+1)]
return [b-a for i, b in enumerate(sqps) for a in sqps[:i]][:terms]
print(aupton(52)) # Michael S. Branicky, May 21 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Clark Kimberling, Jan 20 2012
STATUS
approved