|
|
A135405
|
|
Sequence where the sum of each pair of consecutive elements is a square.
|
|
1
|
|
|
0, 1, 8, 8, 17, 19, 30, 34, 47, 53, 68, 76, 93, 103, 122, 134, 155, 169, 192, 208, 233, 251, 278, 298, 327, 349, 380, 404, 437, 463, 498, 526, 563, 593, 632, 664, 705, 739, 782, 818, 863, 901, 948, 988, 1037, 1079, 1130, 1174, 1227, 1273, 1328, 1376, 1433, 1483
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
This covers squares of all consecutively increasing integers with the exception of 2.
It is actually possible to cover all nonnegative integers by using the given formula starting with n=-2, thus giving terms 2, -2, 3, 1, 8, 8, 17, 19, 30, etc. - Vladimir Joseph Stephan Orlovsky, Feb 12 2015
|
|
LINKS
|
|
|
FORMULA
|
a(n) = (n+2)*(n+1)/2 + 2*(-1)^n for n>0.
O.g.f.: x*(1 +6*x -8*x^2 +3*x^3)/((1-x)^3*(1+x)) = -3 +1/(1-x)^3 + 2/(1+x).
a(n) = A000217(n+1) + 2*(-1)^n if n>0.
(End)
E.g.f.: -3 + 2*exp(-x) + (1/2)*(2 + 4*x + x^2)*exp(x). - G. C. Greubel, Oct 12 2016
a(n) = (-4*(-1)^n+n+n^2)/2 for n>1.
a(n) = 2*a(n-1)-2*a(n-3)+a(n-4) for n>4.
(End)
|
|
EXAMPLE
|
a(1) = 1 because 0 + 1 = 1^2.
a(2) = 8 because 1 + 8 = 9 = 3^2.
a(3) = 8 because 8 + 8 = 16 = 4^2.
|
|
MATHEMATICA
|
Table[(n+2)*(n+1)/2 + 2*(-1)^n, {n, 0, 25}] (* G. C. Greubel, Oct 12 2016 *)
|
|
PROG
|
(Magma) [0] cat [(n+2)*(n+1)/2+2*(-1)^n: n in [1..60]]; // Vincenzo Librandi, Feb 14 2015
(PARI) concat(0, Vec(x*(1+6*x-8*x^2+3*x^3)/((1-x)^3*(1+x)) + O(x^60))) \\ Colin Barker, Oct 13 2016
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,easy
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|