login
A390487
Numbers k with the property that k is the next lexicographically earliest number that cannot be expressed as a linear sum of the squares of preceding terms of the sequence with coefficients of 0, +1 or -1, with a(1)=1.
1
1, 2, 6, 7, 11, 15, 21, 25, 61, 106, 142, 155, 515, 551, 36208, 36384, 40021, 40713, 51765, 56463, 56814, 56859, 154582, 154631, 158303, 158352, 6153954
OFFSET
1,2
COMMENTS
We can classify all numbers as 'reachable' or 'unreachable' as the linear sum of previous term squares, this sequence is then the list of 'unreachable' terms.
LINKS
Sean A. Irvine, Java program (github)
EXAMPLE
106 is unreachable, but 107 = -1^2 + 6^2 - 7^2 + 11^2.
PROG
(Python)
from itertools import islice
def A390487_gen(): # generator of terms
bset, a = {0, 1}, 2
yield 1
while True:
yield a
bset = set().union(*({d, d+a**2, abs(d-a**2)} for d in bset))
a += 1
while a in bset:
a += 1
A390487_list = list(islice(A390487_gen(), 15)) # Chai Wah Wu, Nov 13 2025
CROSSREFS
Sums of j squares: A000290 (j=1), A000404 (j=2), A000408 (j=3), A000414 (j=4), A047700 (j=5).
Sum of all squares less than n: A000330.
Sequence in context: A214991 A286995 A088227 * A231500 A174000 A241720
KEYWORD
nonn,more
AUTHOR
EXTENSIONS
a(20)-a(27) from Sean A. Irvine, Nov 12 2025
STATUS
approved