A322465 Numbers on the 0-9-10-line in a spiral on an equilateral triangular lattice.
0, 9, 10, 31, 32, 65, 66, 111, 112, 169, 170, 239, 240, 321, 322, 415, 416, 521, 522, 639, 640, 769, 770, 911, 912, 1065, 1066, 1231, 1232, 1409, 1410, 1599, 1600, 1801, 1802, 2015, 2016, 2241, 2242, 2479, 2480, 2729, 2730, 2991, 2992, 3265, 3266, 3551, 3552
Offset: 0
Links
- Colin Barker, Table of n, a(n) for n = 0..1000
- Hans G. Oberlack, Triangle spiral line 0-9-10
- Index entries for linear recurrences with constant coefficients, signature (1,2,-2,-1,1).
Crossrefs
Bisection (even part) gives A202804.
Programs
-
Maple
a:= n-> `if`(n::even, n*((3/2)*n+2), (n+1)*((3/2)*(n+1)+2)-1): seq(a(n), n=0..50); # Muniru A Asiru, Dec 20 2018
-
PARI
concat(0, Vec(x*(9 + x + 3*x^2 - x^3) / ((1 - x)^3*(1 + x)^2) + O(x^40))) \\ Colin Barker, Dec 18 2018
Formula
For even n: a(n) = n*((3/2)*n+2).
For odd n: a(n) = a(n+1)-1 = (n+1)*((3/2)*(n+1)+2)-1.
From Colin Barker, Dec 18 2018: (Start)
G.f.: x*(9 + x + 3*x^2 - x^3) / ((1 - x)^3*(1 + x)^2).
a(n) = a(n-1) + 2*a(n-2) - 2*a(n-3) - a(n-4) + a(n-5) for n>4.
(End)
Comments