OFFSET
1,1
FORMULA
k is a term <=> Sum_{i=1..floor(k/2)} Sum_{j=1..k-1} KroneckerDelta((i^2 + (k - i)^2)/j, k) > 0.
Conjecture: k is a term <=> k * Clausen(k, 1) <> 2 * Clausen(k, 0), (Clausen = A160014). In other words: k is in this sequence iff it is not an odd squarefree number. - Peter Luschny, Jun 08 2023
EXAMPLE
8 is in the sequence since it has the solutions (s,t,k) = (4,4,4) and (2,6,5) such that s^2 + t^2 = k*m, s + t = m, 1 <= s <= t and 1 <= k <= m - 1.
9 is in the sequence since it has the solution (s,t,k) = (3,6,5) such that s^2 + t^2 = k*m, s + t = m, 1 <= s <= t and 1 <= k <= m - 1.
MAPLE
# Quite inefficient compared to the conjectured formula.
KD := (n, k) -> Physics:-KroneckerDelta[n, k]:
S := k -> local i, j; add(add(KD((i^2 + (k - i)^2)/j , k), j = 1..k-1),
i = 1..floor(k/2)): select(k -> S(k) > 0, [seq(k, k = 1..40)]); # Peter Luschny, Jun 08 2023
MATHEMATICA
Table[If[Sum[Sum[KroneckerDelta[(i^2 + (n - i)^2)/k, n], {k, n - 1}], {i, Floor[n/2]}] > 0, n, {}], {n, 120}] // Flatten
CROSSREFS
KEYWORD
nonn
AUTHOR
Wesley Ivan Hurt, Oct 01 2020
STATUS
approved