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.
%I A379831 #36 Feb 09 2025 21:21:02 %S A379831 0,25,50,90,146,169,260,289,425,529,625,900,1156,1521,1681,2025,2500, %T A379831 2704,3434,3600,4225,4624,4900,5625,7146,7225,8281,9409,10404,11236, %U A379831 11881,13225,14400,15129,16900,18769,19600,21316,23409,25281,26896,28561,30625,32400,34969,36100,40000,41209,44944,47524 %N A379831 Positions of records in A379857. %C A379831 This sequence is infinite in length. %C A379831 Not all terms are squares, meaning that sometimes k=1 is not among the k values which set a new record. %C A379831 Elements of this sequence are often, but not always, records of A033461. %H A379831 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a> %F A379831 a(n) >> n^3. - _Charles R Greathouse IV_, Jan 06 2025 %e A379831 25 is a member of this sequence, as 25 = 5^2 = 3^2 + 4^2, meaning that it can be expressed as a sum of k squares for two values of k, in this case 1 and 2, which is more than any smaller value. %e A379831 50 is a member of this sequence, as 50 = 7^2 + 1^2 = 5^2 + 4^2 + 3^2 = 6^2 + 3^2 + 2^2 + 1^2, giving 3 possible values of k, being 2, 3 and 4, more than any smaller value. %e A379831 0 begins this sequence, as it is the sum of zero squares, so it has one possible value of k, being k = 0. %o A379831 (Python) %o A379831 MAXSQUARE = 500 %o A379831 possibleSums = {i: [[], []] for i in range(MAXSQUARE ** 2 + 1)} %o A379831 possibleSums[0] = [[0], [0]] %o A379831 for val in range(MAXSQUARE ** 2): %o A379831 for posSquare in range(len(possibleSums[val][0])): %o A379831 newSum = possibleSums[val][0][posSquare] + 1 %o A379831 curr = possibleSums[val][1][posSquare] + 1 %o A379831 while val + curr ** 2 <= MAXSQUARE ** 2: %o A379831 nVal = val + curr ** 2 %o A379831 if newSum not in possibleSums[nVal][0]: %o A379831 possibleSums[nVal][0].append(newSum) %o A379831 possibleSums[nVal][1].append(curr) %o A379831 else: %o A379831 index = possibleSums[nVal][0].index(newSum) %o A379831 if curr < possibleSums[nVal][1][index]: %o A379831 possibleSums[nVal][1][index] = curr %o A379831 curr += 1 %o A379831 best = 0 %o A379831 for i in range(MAXSQUARE ** 2 + 1): %o A379831 if len(possibleSums[i][0]) > best: %o A379831 print(i) %o A379831 best = len(possibleSums[i][0]) %o A379831 records = () %o A379831 best = 0 %o A379831 for i in range(MAXSQUARE ** 2 + 1): %o A379831 sums = len(possibleSums[i][0]) %o A379831 if sums > best: %o A379831 records += (i, ) %o A379831 best = sums %Y A379831 Cf. A033461, A003995, A001156, A379857. %K A379831 nonn %O A379831 1,2 %A A379831 _Luke E. Holland_, Jan 03 2025