login
A234904
a(n)*Pi is the total length of irregular spiral (center points: 2, 1, 3) after n rotations.
8
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,1
COMMENTS
Let points 2, 1 & 3 be placed on a straight line at intervals of 1 unit. At point 1 make a half unit circle then at point 2 make another half circle and maintain continuity of circumferences. Continue using this procedure at points 3, 1, 2, and so on. The form of spiral is non-expanded loop. See illustration in links.
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
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 *)
PROG
(Small Basic)
a[1]=3
For n = 1 To 100
d1=3
m3 = math.Remainder(n+1, 3)
If m3 = 0 Then
d1 = 6
EndIf
If m3 = 2 Then
d1 = 9
EndIf
a[n+1]=a[n]+d1
TextWindow.Write(a[n]+", ")
EndFor
(PARI) Vec(3*x*(x+1)*(2*x+1)/((x-1)^2*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Jul 12 2014
(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
CROSSREFS
Cf. A014105*Pi (total spiral length, 2 inline center points).
Sequence in context: A342776 A104641 A032703 * A284806 A125821 A239052
KEYWORD
nonn,easy
AUTHOR
Kival Ngaokrajang, Jan 01 2014
STATUS
approved