login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

a(n)*Pi is the total length of irregular spiral (center points: 2, 1, 3) after n rotations.
8

%I #54 Sep 08 2022 08:46:06

%S 3,12,18,21,30,36,39,48,54,57,66,72,75,84,90,93,102,108,111,120,126,

%T 129,138,144,147,156,162,165,174,180,183,192,198,201,210,216,219,228,

%U 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

%N a(n)*Pi is the total length of irregular spiral (center points: 2, 1, 3) after n rotations.

%C 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.

%H Kival Ngaokrajang, <a href="/A234904/a234904.pdf">Illustration of initial terms</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1)

%F a(n) = 3*A047234(n+1).

%F From _Colin Barker_, Jul 12 2014: (Start)

%F a(n) = a(n-1) + a(n-3) - a(n-4).

%F G.f.: 3*x*(x+1)*(2*x+1) / ((x-1)^2*(x^2+x+1)). (End)

%F 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

%t RecurrenceTable[{a[n] == a[n - 1] + a[n - 3] - a[n - 4], a[1] == 3,

%t a[2] == 12, a[3] == 18, a[4] == 21}, a, {n, 1, 68}] (* _Michael De Vlieger_, May 09 2015 *)

%t LinearRecurrence[{1, 0, 1, -1}, {3, 12, 18, 21}, 70] (* _Vincenzo Librandi_, May 10 2015 *)

%o (Small Basic)

%o a[1]=3

%o For n = 1 To 100

%o d1=3

%o m3 = math.Remainder(n+1,3)

%o If m3 = 0 Then

%o d1 = 6

%o EndIf

%o If m3 = 2 Then

%o d1 = 9

%o EndIf

%o a[n+1]=a[n]+d1

%o TextWindow.Write(a[n]+", ")

%o EndFor

%o (PARI) Vec(3*x*(x+1)*(2*x+1)/((x-1)^2*(x^2+x+1)) + O(x^100)) \\ _Colin Barker_, Jul 12 2014

%o (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

%Y Cf. A014105*Pi (total spiral length, 2 inline center points).

%K nonn,easy

%O 1,1

%A _Kival Ngaokrajang_, Jan 01 2014