cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A176059 Periodic sequence: Repeat 3, 2.

This page as a plain text file.
%I A176059 #27 Aug 04 2025 07:42:53
%S A176059 3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,
%T A176059 3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,
%U A176059 3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3
%N A176059 Periodic sequence: Repeat 3, 2.
%C A176059 Interleaving of A010701 and A007395.
%C A176059 Also continued fraction expansion of (3+sqrt(15))/2.
%C A176059 Also decimal expansion of 32/99.
%C A176059 a(n) = A010693(n+1).
%C A176059 Essentially first differences of A047218.
%C A176059 Binomial transform of 3 followed by -A122803.
%C A176059 Inverse binomial transform of 3 followed by A020714.
%C A176059 Second inverse binomial transform of A057198 without initial term 1.
%H A176059 <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (0, 1).
%F A176059 a(n) = (5+(-1)^n)/2.
%F A176059 a(n) = a(n-2) for n > 1; a(0) = 3, a(1) = 2.
%F A176059 a(n) = -a(n-1)+5 for n > 0; a(0) = 3.
%F A176059 a(n) = 3*((n+1) mod 2)+2*(n mod 2).
%F A176059 G.f.: (3+2*x)/((1-x)*(1+x)).
%F A176059 E.g.f.: 3*cosh(x) + 2*sinh(x). - _Stefano Spezia_, Aug 04 2025
%p A176059 A176059:=n->(5+(-1)^n)/2; seq(A176059(n), n=0..100); # _Wesley Ivan Hurt_, Feb 26 2014
%t A176059 a[n_] := {3, 2}[[Mod[n, 2] + 1]]; Table[a[n], {n, 0, 104}] (* _Jean-François Alcover_, Jul 19 2013 *)
%t A176059 PadRight[{},120,{3,2}] (* _Harvey P. Dale_, Oct 06 2019 *)
%o A176059 (Magma) &cat[ [3, 2]: n in [0..52] ];
%o A176059 [ (5+(-1)^n)/2: n in [0..104] ];
%o A176059 (Haskell)
%o A176059 a176059 = (3 -) . (`mod` 2) -- _Reinhard Zumkeller_, Nov 27 2012
%o A176059 (Haskell)
%o A176059 a176059_list = cycle [3,2]  -- _Reinhard Zumkeller_, Apr 04 2012
%o A176059 (PARI) a(n)=3-n%2 \\ _Charles R Greathouse IV_, Jul 13 2016
%Y A176059 Cf. A010701 (all 3's sequence), A007395 (all 2's sequence), A176058 (decimal expansion of (3+sqrt(15))/2), A010693 (repeat 2, 3), A047218 (congruent to {0, 3} mod 5), A122803 (powers of -2), A020714 (5*2^n), A057198 ((5*3^(n-1)+1)/2, n > 0).
%Y A176059 Cf. A026532 (partial products).
%K A176059 cofr,cons,nonn,easy
%O A176059 0,1
%A A176059 _Klaus Brockhaus_, Apr 07 2010