login

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”).

A130974
Period 6: repeat [1, 1, 1, 3, 3, 3].
3
1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1, 3, 3, 3, 1, 1, 1
OFFSET
0,4
FORMULA
G.f.: (1+3*x^3)/((1-x)*(1+x)*(1-x+x^2)). - R. J. Mathar, Nov 15 2007
a(n) = 2 - (2/3)*cos((1/3)*Pi*n) - (2/3)*3^(1/2)*sin((1/3)*Pi*n) + (1/3)*(-1)^(1+n). - R. J. Mathar, Nov 15 2007
a(n) = 2 - (-1)^floor(n/3). - Bruno Berselli, Jul 09 2013
a(n) = a(n-1) - a(n-3) + a(n-4) for n > 3. - Wesley Ivan Hurt, Jun 20 2016
MAPLE
A130974:=n->[1, 1, 1, 3, 3, 3][(n mod 6)+1]: seq(A130974(n), n=0..100); # Wesley Ivan Hurt, Jun 20 2016
MATHEMATICA
PadRight[{}, 100, {1, 1, 1, 3, 3, 3}] (* Wesley Ivan Hurt, Jun 20 2016 *)
PROG
(Magma) &cat [[1, 1, 1, 3, 3, 3]^^30]; // Wesley Ivan Hurt, Jun 20 2016
(PARI) a(n) = [1, 1, 1, 3, 3, 3][n%6+1]; \\ Jinyuan Wang, Feb 26 2020
CROSSREFS
Cf. A177957 (decimal expansion of (12+3*sqrt(35))/19). - Klaus Brockhaus, May 16 2010
Sequence in context: A353631 A353641 A131289 * A064353 A190906 A355586
KEYWORD
nonn,easy
AUTHOR
Paul Curtz, Sep 28 2007
STATUS
approved