The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A186187 Period 8 sequence [ 2, 2, 1, 2, 4, 2, 1, 2, ...] except a(0) = 1. 0
1, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2, 2, 1, 2, 4, 2, 1, 2, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,2
COMMENTS
Also continued fraction expansion of sqrt(2717)/38. - Bruno Berselli, Mar 07 2011
LINKS
FORMULA
Euler transform of length 8 sequence [ 2, -2, 2, 0, 0, -2, 0, 1].
Moebius transform is length 8 sequence [ 2, -1, 0, 3, 0, 0, 0, -2].
a(n) = 2 * b(n) where b() is multiplicative with b(2) = 1/2, b(4) = 2, b(2^e) = 1 if e>2, b(p^e) = 1 if p>2.
G.f.: (1 + x)^4 * (1 - x + x^2)^2 / (1 - x^8) = (1-x+x^2)^2*(1+x)^3 / ((1-x) *(1+x^2) *(1+x^4)). a(-n) = a(n). a(2*n + 1) = 2, a(4*n + 2) = 1, a(8*n + 4) = 4, a(8*n) = 2 except a(0) = 1.
a(n) = A056594(n)-A014017(n)+2 for n>0. - Bruno Berselli, Feb 15 2011
EXAMPLE
1 + 2*x + x^2 + 2*x^3 + 4*x^4 + 2*x^5 + x^6 + 2*x^7 + 2*x^8 + 2*x^9 + ...
MATHEMATICA
PadRight[{1}, 108, {2, 2, 1, 2, 4, 2, 1, 2}] (* Harvey P. Dale, Mar 22 2012 *)
PROG
(PARI) {a(n) = - (n==0) + [ 2, 2, 1, 2, 4, 2, 1, 2] [n%8 + 1]}
(PARI) {a(n) = polcoeff( (1 + x)^4 * (1 - x + x^2)^2 / (1 - x^8) + x * O(x^abs(n)), abs(n))}
(Magma) [1] cat &cat[ [2, 1, 2, 4, 2, 1, 2, 2]: n in [1..13]]; // Bruno Berselli, Mar 07 2011
CROSSREFS
Sequence in context: A290091 A059149 A273917 * A013943 A164281 A082693
KEYWORD
nonn,easy
AUTHOR
Michael Somos, Feb 14 2011
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 21 19:35 EDT 2024. Contains 372738 sequences. (Running on oeis4.)