|
|
A100254
|
|
Let j be the smallest integer for which 1 + (1+1*n) + (1+2*n) + ... + (1+j*n) = k^2 = s. Then a(n)=j; if no such j exists, then a(n)=0.
|
|
7
|
|
|
7, 1, 80, 24, 5, 8, 1, 0, 6, 3, 2, 8, 21, 1, 48, 3, 7, 0, 16, 8, 80, 4, 1, 24, 45, 2, 9, 120, 5, 8, 17, 3, 30, 1, 10, 168, 6, 5, 1680, 48, 7, 3, 4960, 11, 224, 7, 1, 15, 31, 0, 48, 24, 16, 12, 288, 8, 48, 6, 26, 80, 117, 1, 136160, 195, 13, 3, 9, 840, 1520, 24, 49, 8, 70, 2, 1680
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
Basis for sequence is shortest arithmetic series with initial term 1 and difference n that sums to a perfect square.
|
|
LINKS
|
|
|
FORMULA
|
1 + (1+1*n) + (1+2*n) + ... + (1+a(n)*n) = 1 + (1+1*n) + (1+2*n) + ... + A100253(n) = A100251(n)^2 = A100252(n).
|
|
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
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|