|
|
A178218
|
|
Numbers of the form 2k^2-2k+1 or 2k^2-1.
|
|
18
|
|
|
1, 5, 7, 13, 17, 25, 31, 41, 49, 61, 71, 85, 97, 113, 127, 145, 161, 181, 199, 221, 241, 265, 287, 313, 337, 365, 391, 421, 449, 481, 511, 545, 577, 613, 647, 685, 721, 761, 799, 841, 881, 925, 967, 1013, 1057, 1105, 1151, 1201, 1249
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Numbers which when squared are used as entries in magic squares. A sequence of numbers whose difference is an interleaved array consisting of 4,6,8,10,12,... and a second sequence 2,4,6,8,10,... . Each entry when squared produces an entry into a tuple used as the right diagonal in a magic square. The difference between square entries produces a third sequence 24,24,120,120,336,336,720,720,1320,1320,..., numbers divisible by 24 and generating the sequence of natural number squares.
|
|
LINKS
|
T. C. Brown, A. R. Freedman, and P. JS. Shiue, Progressions of squares, The Australasian Journal of Combinatorics, Volume 27 (2003), p.187.
|
|
FORMULA
|
a(n) = 2*a(n-1) - 2*a(n-3) + a(n-4).
G.f.: x*(1+3*x-3*x^2+x^3)/((1-x)^3*(1+x)). (End)
2*a(2n)^2 = a(2n-1)^2 + a(2n+1)^2.
E.g.f.: ((x^2 + 3*x + 2)*cosh(x) + (x^2 + 3*x - 1)*sinh(x) - 2)/2. - Stefano Spezia, Feb 22 2024
|
|
MATHEMATICA
|
Join[{1}, Flatten[Table[{(n^2 + 1)/2, (n^2 + 2 n - 1)/2}, {n, 3, 50, 2}]]]
Table[(2 n (n + 2) + 3 (-1)^n + 1)/4, {n, 49}] (* Bruno Berselli, Apr 04 2012 *)
CoefficientList[Series[(1+3*x-3*x^2+x^3)/((1-x)^3*(1+x)), {x, 0, 60}], x] (* Vincenzo Librandi, Jun 09 2012 *)
LinearRecurrence[{2, 0, -2, 1}, {1, 5, 7, 13}, 60] (* Harvey P. Dale, Jun 09 2019 *)
|
|
PROG
|
(Magma) I:=[1, 5, 7, 13]; [n le 4 select I[n] else 2*Self(n-1)-2*Self(n-3)+Self(n-4): n in [1..60]]; // Vincenzo Librandi, Jun 09 2012
(Python)
a = 1
for n in range(2, 77):
print(a, end=", ")
a = n*(n+1) - a
(Maxima)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|