login
A322462
Numbers on the 0-1-12 line in a spiral on a grid of equilateral triangles.
1
0, 1, 12, 13, 36, 37, 72, 73, 120, 121, 180, 181, 252, 253, 336, 337, 432, 433, 540, 541, 660, 661, 792, 793, 936, 937, 1092, 1093, 1260, 1261, 1440, 1441, 1632, 1633, 1836, 1837, 2052, 2053, 2280, 2281, 2520, 2521, 2772, 2773, 3036, 3037, 3312, 3313, 3600
OFFSET
0,3
COMMENTS
Sequence found by reading the line from 0, in the direction 0, 1, 12, ... in the triangle spiral.
FORMULA
a(n) = (3/2)*n*(n+2) = A049598(n/2) if n even, a(n) = a(n-1)+1 if n odd.
G.f.: -x*(x^3-x^2+11*x+1)/((x+1)^2*(x-1)^3). - Alois P. Heinz, Dec 09 2018
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4. - Colin Barker, Dec 09 2018
EXAMPLE
a(0) = 0
a(1) = a(1 - 1) + 1 = 0 + 1
a(2) = (3/2) * 2 * (2 + 2) = 3 * 4 = 12
a(3) = a(3 - 1) + 1 = 12 + 1 = 13
a(4) = (3/2) * 4*(4 + 2) = 3 * 2 * 6 = 6 * 6 = 36
a(5) = a(4) + 1 = 36 + 1 = 37.
MAPLE
seq(coeff(series(-x*(x^3-x^2+11*x+1)/((x+1)^2*(x-1)^3), x, n+1), x, n), n = 0 .. 50); # Muniru A Asiru, Dec 19 2018
MATHEMATICA
a[0] = 0; a[n_] := a[n] = If[OddQ[n], a[n - 1] + 1, 3/2*n*(n + 2)]; Array[a, 50, 0] (* Amiram Eldar, Dec 09 2018 *)
PROG
(PARI) concat(0, Vec(x*(1 + 11*x - x^2 + x^3) / ((1 - x)^3*(1 + x)^2) + O(x^40))) \\ Colin Barker, Dec 09 2018
CROSSREFS
Cf. A049598.
Sequence in context: A106323 A177796 A342942 * A037304 A041298 A041689
KEYWORD
nonn,easy
AUTHOR
Hans G. Oberlack, Dec 09 2018
EXTENSIONS
Examples added by Hans G. Oberlack, Dec 20 2018
STATUS
approved