login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Numbers k such that there exist equal sums of k and 2k consecutive positive squares.
1

%I #29 Nov 05 2024 18:53:53

%S 1,17,23,25,49,55,71,73,79,89,95,103,113,127,143,161,167,175,185,191,

%T 193,199,215,217,233,239,241,265,271,287,289,305,361,377,391,409,415,

%U 431,433,457,473,481,505,511,521,535,545,553,569,593,599,617,631,647

%N Numbers k such that there exist equal sums of k and 2k consecutive positive squares.

%C a(n) is congruent to 1 or 5 (mod 6).

%C 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 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 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 <a href="/index/Su#ssq">Index entries for sequences related to sums of squares</a>

%e 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 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 (Python)

%o import sympy # Version 1.8

%o xx, yy = sympy.symbols("x y")

%o def pyramidal(n):

%o return n*(n+1)*(2*n+1)/6 # A000330(n)

%o def expanded_diophantine(k,n):

%o left_hand_side = pyramidal(xx+n-1) - pyramidal(xx-1)

%o right_hand_side = pyramidal(yy+n+k-1) - pyramidal(yy-1)

%o return sympy.expand(right_hand_side-left_hand_side)

%o def has_solutions(k,n):

%o return len(sympy.solvers.diophantine(expanded_diophantine(k,n))) != 0

%o def k_in_a346163(k):

%o return has_solutions(k,k)

%Y Cf. A000330, A001032, A130052.

%K nonn

%O 1,2

%A _Johan Westin_, Jul 08 2021