A211422 Number of ordered triples (w,x,y) with all terms in {-n,...,0,...,n} and w^2 + x*y = 0.
1, 9, 17, 25, 41, 49, 57, 65, 81, 105, 113, 121, 137, 145, 153, 161, 193, 201, 225, 233, 249, 257, 265, 273, 289, 329, 337, 361, 377, 385, 393, 401, 433, 441, 449, 457, 505, 513, 521, 529, 545, 553, 561, 569, 585, 609, 617, 625, 657, 713, 753, 761
Offset: 0
Keywords
A320259 Terms that are on the y-axis of the square spiral built with 2*k, 2*k+1, 2*k+1 for k >= 0.
0, 2, 5, 9, 15, 22, 30, 40, 51, 63, 77, 92, 108, 126, 145, 165, 187, 210, 234, 260, 287, 315, 345, 376, 408, 442, 477, 513, 551, 590, 630, 672, 715, 759, 805, 852, 900, 950, 1001, 1053, 1107, 1162, 1218, 1276, 1335
Offset: 0
Keywords
Comments
a(n) mod 9 is of period 27.
The spiral:
28--29--29--30--31--31--32
|
27 13--14--15--15--16--17
| | |
27 13 4---5---5---6 17
| | | | |
26 12 3 0---1 7 18
| | | | | |
25 11 3---2---1 7 19
| | | |
25 11--10---9---9---8 19
| |
24--23--23--22--21--21--20
Examples
G.f. = 2*x + 5*x^2 + 9*x^3 + 15*x^4 + 22*x^5 + 30*x^6 + ... - _Michael Somos_, Nov 13 2018
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Index entries for linear recurrences with constant coefficients, signature (2,-1,1,-2,1).
Crossrefs
Programs
-
GAP
a:=[0,2,5,9,15];; for n in [6..50] do a[n]:=2*a[n-1]-a[n-2]+a[n-3]-2*a[n-4]+a[n-5]; od; a; # Muniru A Asiru, Oct 08 2018
-
Maple
seq(coeff(series(x^2*(2+x+x^2)/((1-x)^3*(1+x+x^2)),x,n+1), x, n), n = 1 .. 50); # Muniru A Asiru, Oct 08 2018
-
Mathematica
LinearRecurrence[{2,-1,1,-2,1}, {0, 2, 5, 9, 15}, 50] (* or *) CoefficientList[Series[x*(2 + x + x^2) / ((1 - x)^3*(1 + x + x^2)), {x, 0, 50}], x] (* Stefano Spezia, Oct 09 2018 *) a[ n_] := Quotient[(n + 1) (2 n + 1), 3]; (* Michael Somos, Nov 13 2018 *)
-
PARI
concat(0, Vec(x*(2 + x + x^2) / ((1 - x)^3*(1 + x + x^2)) + O(x^60))) \\ Colin Barker, Oct 08 2018
-
PARI
{a(n) = (n + 1) * (2*n + 1) \ 3}; /* Michael Somos, Nov 13 2018 */
Formula
a(n) = 2*a(n-1) - a(n-2) + a(n-3) - 2*a(n-4) + a(n-5), a(0)=0, a(1)=2, a(2)=5, a(3)=9, a(4)=15.
a(n) = a(n-1) + A004772(n+1), a(0)=0, n>0.
a(n+15) = a(n-15) + 10*A004767(n).
a(-n-1) = ({0} U A000969(n)) = 0, 1, 3, 7, ... = b(n), the full x-axis terms.
a(-n-1) + a(n) = 0, 3, 8, 16, ... = A211480(n+1).
a(n) = b(n) + A004523(n+1).
G.f.: x*(2 + x + x^2) / ((1 - x)^3*(1 + x + x^2)). - Colin Barker, Oct 08 2018
a(n) = A000969(-2-n) for all n in Z. - Michael Somos, Nov 13 2018
Comments
Examples
Links
Crossrefs
Programs
Mathematica