A346163 Numbers k such that there exist equal sums of k and 2k consecutive positive squares.
1, 17, 23, 25, 49, 55, 71, 73, 79, 89, 95, 103, 113, 127, 143, 161, 167, 175, 185, 191, 193, 199, 215, 217, 233, 239, 241, 265, 271, 287, 289, 305, 361, 377, 391, 409, 415, 431, 433, 457, 473, 481, 505, 511, 521, 535, 545, 553, 569, 593, 599, 617, 631, 647
Offset: 1
Keywords
Examples
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. 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.
Links
- H. L. Alder and U. Alfred, n and n+k Consecutive Integers with Equal Sums of Squares, The American Mathematical Monthly, 71:7 (1964), 749-754.
- Index entries for sequences related to sums of squares
Programs
-
Python
import sympy # Version 1.8 xx, yy = sympy.symbols("x y") def pyramidal(n): return n*(n+1)*(2*n+1)/6 # A000330(n) def expanded_diophantine(k,n): left_hand_side = pyramidal(xx+n-1) - pyramidal(xx-1) right_hand_side = pyramidal(yy+n+k-1) - pyramidal(yy-1) return sympy.expand(right_hand_side-left_hand_side) def has_solutions(k,n): return len(sympy.solvers.diophantine(expanded_diophantine(k,n))) != 0 def k_in_a346163(k): return has_solutions(k,k)
Comments