login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A271566 a(n) is the length of the n-th run in A137734. 2

%I #37 Sep 08 2022 08:46:16

%S 2,3,1,1,3,1,2,4,1,3,5,1,4,6,1,5,7,1,6,8,1,7,9,1,8,10,1,9,11,1,10,12,

%T 1,11,13,1,12,14,1,13,15,1,14,16,1,15,17,1,16,18,1,17,19,1,18,20,1,19,

%U 21,1,20,22,1,21,23,1,22,24,1,23,25

%N a(n) is the length of the n-th run in A137734.

%H Vincenzo Librandi, <a href="/A271566/b271566.txt">Table of n, a(n) for n = 1..2000</a> (first 945 terms from Alec Jones)

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

%F For n > 2: a(n) = 1 if 3 divides n; a(n) = (1/3)*(n-1) if n == 1 (mod 3); a(n) = a(n-1) + 2 if n == 2 (mod 3).

%F For n > 2, a(n) = (4*n + 12 + (6-4*n)*cos(2*n*Pi/3) - 5*sqrt(3)*sin(2*n*Pi/3) + 5*sqrt(3)*sin(4*n*Pi/3))/18. - _Wesley Ivan Hurt_, Sep 25 2017

%F From _Colin Barker_, Sep 26 2017: (Start)

%F G.f.: x*(2 + 3*x + x^2 - 3*x^3 - 3*x^4 - x^5 + 2*x^6 + x^7) / ((1 - x)^2*(1 + x + x^2)^2).

%F a(n) = 2*a(n-3) - a(n-6) for n>8. (End)

%t Join[{2, 3}, LinearRecurrence[{0, 0, 2, 0, 0, -1}, {1, 1, 3, 1, 2, 4}, 200]] (* _Vincenzo Librandi_, Sep 27 2017 *)

%o (PARI) Vec(x*(2 + 3*x + x^2 - 3*x^3 - 3*x^4 - x^5 + 2*x^6 + x^7) / ((1 - x)^2*(1 + x + x^2)^2) + O(x^100)) \\ _Colin Barker_, Sep 26 2017

%o (Magma) I:=[2,3,1,1,3,1,2,4]; [n le 8 select I[n] else 2*Self(n-3)-Self(n-6): n in [1..100]]; // _Vincenzo Librandi_, Sep 27 2017

%Y Cf. A137734.

%K nonn,easy

%O 1,1

%A _Alec Jones_, Apr 12 2016

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 19 02:28 EDT 2024. Contains 371782 sequences. (Running on oeis4.)