Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #44 Mar 21 2023 15:41:18
%S 1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,
%T 1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,
%U 1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1,1,1,2,1
%N Period 4: repeat [1, 1, 1, 2].
%C Continued fraction expansion of (3 + 2*sqrt(6))/5.
%C Decimal expansion of 1112/9999.
%C a(n) = A164115(n + 1) = (-1)^(n + 1) * A164117(n + 1) = A138191(n + 3) = A107453(n + 5).
%H Vincenzo Librandi, <a href="/A177704/b177704.txt">Table of n, a(n) for n = 0..1000</a>
%H David Nacin, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL26/Nacin/nacin5.html">Van der Laan Sequences and a Conjecture on Padovan Numbers</a>, J. Int. Seq., Vol. 26 (2023), Article 23.1.2.
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,0,1).
%F a(n) = (5-(-1)^n + i*i^n-i*(-i)^n)/4 where i = sqrt(-1).
%F a(n) = a(n-4) for n > 3; a(0) = 1, a(1) = 1, a(2) = 1, a(3) = 2.
%F G.f.: (1+x+x^2+2*x^3)/(1-x^4).
%F a(n) = 1 + (1-(-1)^n) * (1+i^(n+1))/4 where i = sqrt(-1). - _Bruno Berselli_, Apr 05 2011
%F a(n) = 5/4 - sin(Pi*n/2)/2 - (-1)^n/4. - _R. J. Mathar_, Oct 08 2011
%F a(n) = floor((n+1)*5/4) - floor(n*5/4). - _Hailey R. Olafson_, Jul 23 2014
%F From _Wesley Ivan Hurt_, Jun 15 2016: (Start)
%F a(n+3) - a(n+2) = A219977(n).
%F Sum_{i=0..n-1} a(i) = A001068(n). (End)
%F E.g.f.: (-sin(x) + 3*sinh(x) + 2*cosh(x))/2. - _Ilya Gutkovskiy_, Jun 15 2016
%p A177704:=n->floor((n+1)*5/4) - floor(n*5/4): seq(A177704(n), n=0..100); # _Wesley Ivan Hurt_, Jun 15 2016
%t Table[Floor[(n + 1)*5/4] - Floor[n*5/4], {n, 0, 100}] (* _Wesley Ivan Hurt_, Jun 15 2016 *)
%t LinearRecurrence[{0, 0, 0, 1}, {1, 1, 1, 2}, 100] (* _Vincenzo Librandi_, Jun 16 2016 *)
%o (Magma) &cat[ [1, 1, 1, 2]: k in [1..27] ];
%o (PARI) a(n) = if(n%4==3, 2, 1) \\ _Felix Fröhlich_, Jun 15 2016
%Y Cf. A001068, A107453, A138191, A164115, A164117, A177705, A219977, A236398.
%K nonn,cofr,easy
%O 0,4
%A _Klaus Brockhaus_, May 11 2010