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 A346163 #29 Nov 05 2024 18:53:53 %S A346163 1,17,23,25,49,55,71,73,79,89,95,103,113,127,143,161,167,175,185,191, %T A346163 193,199,215,217,233,239,241,265,271,287,289,305,361,377,391,409,415, %U A346163 431,433,457,473,481,505,511,521,535,545,553,569,593,599,617,631,647 %N A346163 Numbers k such that there exist equal sums of k and 2k consecutive positive squares. %C A346163 a(n) is congruent to 1 or 5 (mod 6). %C A346163 a(n) is not congruent to 3, 4 or 5 (mod 8) or to 7, 11, 16 or 20 (mod 27), see Alder and Alfred. %C A346163 k is in the sequence if the quadratic Diophantine equation 6*(k*x^2 - 2*k*y^2 + k*(k-1)*x + 2*k*(1-2*k)*y) - 14*k^3 + 9*k^2 - k = 0 has solutions x, y in the positive integers. %H A346163 H. L. Alder and U. Alfred, <a href="https://www.jstor.org/stable/2310889">n and n+k Consecutive Integers with Equal Sums of Squares</a>, The American Mathematical Monthly, 71:7 (1964), 749-754. %H A346163 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a> %e A346163 a(1): 5^2 = 3^2 + 4^2. Here the left-hand side has k = 1 term, and the right-hand side has 2k = 2 terms. Hence k = 1 is in the sequence. %e A346163 a(2): 29^2 + 30^2 + ... + 44^2 + 45^2 = 8^2 + 9^2 + ... + 40^2 + 41^2 = 23681. Here the left and right sums have k = 17 and 2k = 34 terms, respectively. Hence k = 17 is in the sequence. %o A346163 (Python) %o A346163 import sympy # Version 1.8 %o A346163 xx, yy = sympy.symbols("x y") %o A346163 def pyramidal(n): %o A346163 return n*(n+1)*(2*n+1)/6 # A000330(n) %o A346163 def expanded_diophantine(k,n): %o A346163 left_hand_side = pyramidal(xx+n-1) - pyramidal(xx-1) %o A346163 right_hand_side = pyramidal(yy+n+k-1) - pyramidal(yy-1) %o A346163 return sympy.expand(right_hand_side-left_hand_side) %o A346163 def has_solutions(k,n): %o A346163 return len(sympy.solvers.diophantine(expanded_diophantine(k,n))) != 0 %o A346163 def k_in_a346163(k): %o A346163 return has_solutions(k,k) %Y A346163 Cf. A000330, A001032, A130052. %K A346163 nonn %O A346163 1,2 %A A346163 _Johan Westin_, Jul 08 2021