OFFSET
1,1
COMMENTS
Basis for sequence is shortest arithmetic series with initial term 1 and difference n that sums to a perfect square.
FORMULA
EXAMPLE
a(3)=80 since 1 + 4 + 7 +...+ (1+80*3) = 99^2 = 9801 and no other arithmetic series with initial term 1, difference 3 and fewer terms sums to a perfect square.
MATHEMATICA
a[n_] := Block[{k = 1}, While[ !IntegerQ[ Sqrt[(k + 1)(1 + k*n/2)]], k++ ]; k]; a[18] = a[50] = 0; Table[ a[n], {n, 75}] (* Robert G. Wilson v, Nov 27 2004 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Charlie Marion, Nov 21 2004
EXTENSIONS
More terms from Robert G. Wilson v, Nov 27 2004
STATUS
approved