A234904 a(n)*Pi is the total length of irregular spiral (center points: 2, 1, 3) after n rotations.
3, 12, 18, 21, 30, 36, 39, 48, 54, 57, 66, 72, 75, 84, 90, 93, 102, 108, 111, 120, 126, 129, 138, 144, 147, 156, 162, 165, 174, 180, 183, 192, 198, 201, 210, 216, 219, 228, 234, 237, 246, 252, 255, 264, 270, 273, 282, 288, 291, 300, 306, 309, 318, 324, 327, 336, 342, 345, 354, 360, 363, 372, 378, 381, 390, 396, 399, 408
Offset: 1
Links
- Kival Ngaokrajang, Illustration of initial terms
- Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1)
Crossrefs
Cf. A014105*Pi (total spiral length, 2 inline center points).
Programs
-
Magma
I:=[3,12,18,21]; [n le 4 select I[n] else Self(n-1)+Self(n-3)-Self(n-4): n in [1..70]]; // Vincenzo Librandi, May 10 2015
-
Mathematica
RecurrenceTable[{a[n] == a[n - 1] + a[n - 3] - a[n - 4], a[1] == 3, a[2] == 12, a[3] == 18, a[4] == 21}, a, {n, 1, 68}] (* Michael De Vlieger, May 09 2015 *) LinearRecurrence[{1, 0, 1, -1}, {3, 12, 18, 21}, 70] (* Vincenzo Librandi, May 10 2015 *)
-
PARI
Vec(3*x*(x+1)*(2*x+1)/((x-1)^2*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Jul 12 2014
Formula
a(n) = 3*A047234(n+1).
From Colin Barker, Jul 12 2014: (Start)
a(n) = a(n-1) + a(n-3) - a(n-4).
G.f.: 3*x*(x+1)*(2*x+1) / ((x-1)^2*(x^2+x+1)). (End)
Interlaced polynomials: a(3n) = 18*n; a(3n+1) = 18*n+3; a(3n+2) = 18*n + 12 for n > 0. - Avi Friedlich, May 16 2015
Comments