login
A021115
Decimal expansion of 1/111.
1
0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9, 0, 0, 9
OFFSET
0,3
COMMENTS
Period 3: repeat [0, 0, 9]. - Joerg Arndt, Sep 29 2015
FORMULA
From Alexander R. Povolotsky, Sep 29 2015: (Start)
G.f.: 9*x^2/(1 - x^3).
a(n) = (9/2)*( (n-1)*n mod 3 ) = 4*(n mod 3) - 2*((n+1) mod 3) + ((n+2) mod 3), formulas suggested by Giovanni Resta.
a(n) = 3*( 1 + cos(2*(n+1)*Pi/3) + cos(4*(n+1)*Pi/3) ).
a(n) = a(n + 3) for n>2.
a(n) = A056992(n+1) - (3*(n+1)^4+3*(n+1)^6+4*(n+1)^8) mod 9. (End)
a(n) = 9*A022003(n). - Robert Israel, Sep 30 2015
MAPLE
seq(op([0, 0, 9]), i=1..100); # Robert Israel, Sep 30 2015
MATHEMATICA
PadRight[{}, 100, {0, 0, 9}] (* Wesley Ivan Hurt, Jun 30 2016 *)
PROG
(PARI) 1/111.0 \\ Michel Marcus, Sep 29 2015
(PARI) a(n) = 9*(n*(n-1)%3)/2;
vector(100, n, a(n-1)) \\ Altug Alkan, Sep 30 2015
(Magma) &cat[[0, 0, 9]: n in [0..35]]; // Vincenzo Librandi, Sep 29 2015
CROSSREFS
Sequence in context: A296458 A199870 A132267 * A073052 A230068 A176908
KEYWORD
nonn,cons,easy
EXTENSIONS
Edited by Bruno Berselli, Dec 15 2015
STATUS
approved