|
|
A130793
|
|
Periodic sequence with period 3: 1, 3, 5.
|
|
3
|
|
|
1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1, 3, 5, 1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Continued fraction expansion of (9+sqrt(145))/16. - Klaus Brockhaus, Apr 28 2010
|
|
LINKS
|
Table of n, a(n) for n=0..99.
Index entries for linear recurrences with constant coefficients, signature (0,0,1).
|
|
FORMULA
|
a(n) = (1/3)*(7*(n mod 3)+((n+1) mod 3)+((n+2) mod 3)). - Paolo P. Lava, Jul 18 2007
a(n) = 3+2*A049347(n+1). O.g.f.: (1+3x+5x^2)/((1-x)(1+x+x^2)). - R. J. Mathar, Jun 13 2008
a(n) = ((n+1)^6 - n^6) mod 6. - Gary Detlefs, Mar 25 2012
a(n) = (2n+1) mod 6. - Wesley Ivan Hurt, Mar 30 2014
a(n) = 2*(n mod 3) + 1. - Bruno Berselli, Jul 25 2018
|
|
MAPLE
|
A130793:=n->((2*n+1) mod 6); seq(A130793(n), n=0..100); # Wesley Ivan Hurt, Mar 30 2014
|
|
MATHEMATICA
|
Table[Mod[2 n + 1, 6], {n, 0, 100}] (* Wesley Ivan Hurt, Mar 30 2014 *)
PadRight[{}, 105, {1, 3, 5}] (* After Harvey P. Dale *)
Nest[Flatten[# /. {1 -> {1, 3}, 3 -> {5, 1}, 5 -> {3, 5}}] &, {1}, 7] (* or *) CoefficientList[Series[-(5 x^2 + 3 x + 1)/(x^3 - 1), {x, 0, 105}], x] (* or *) LinearRecurrence[{0, 0, 1}, {1, 3, 5}, 105] (* Robert G. Wilson v, Jul 25 2018 *)
|
|
PROG
|
(PARI) a(n)=[1, 3, 5][n%3+1] \\ Charles R Greathouse IV, Jun 02 2011
(MAGMA) &cat [[1, 3, 5]^^35]; // Vincenzo Librandi, Jul 25 2018
|
|
CROSSREFS
|
Cf. A021078.
Cf. A176907 (decimal expansion of (9+sqrt(145))/16). - Klaus Brockhaus, Apr 28 2010
Sequence in context: A049246 A231186 A021078 * A243854 A084243 A275056
Adjacent sequences: A130790 A130791 A130792 * A130794 A130795 A130796
|
|
KEYWORD
|
nonn,easy,less
|
|
AUTHOR
|
Paul Curtz, Jul 15 2007
|
|
STATUS
|
approved
|
|
|
|