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!)
A084091 Expansion of Sum_{k>=0} x^2^k/(1+x^2^k+x^2^(k+1)). 7
0, 1, 0, 0, 1, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, 0, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, 0, 0, -1, 0, 1, -1, 0, 0, -1, 0, 1, 0, 0, 1, -1, 0, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
Chances of values -1/0/+1 are ~ 2:5:2.
LINKS
FORMULA
a(2n) = a(n) + 1 - (n+1 mod 3), a(2n+1) = 1 - (n mod 3). - Ralf Stephan, Sep 27 2003
a(n) is multiplicative with a(2^e) = (1 + (-1)^e)/2, a(3^e) = 0^e, a(p^e) = 1 if p == 1 (mod 6), a(p^e) = (-1)^e if p == 5 (mod 6). - Michael Somos, Jul 18 2004
G.f. A(x) satisfies 0 = f(A(x), A(x^2), A(x^4)) where f(u, v, w) = u^2 - v^2 + 2*w*(v-u) + w-v. - Michael Somos, Jul 18 2004
G.f.: Sum_{k>=0} f(x^2^k) where f(x) := x * (1 - x) / (1 - x^3). - Michael Somos, Jul 18 2004
max(Sum_{k=0..n} a(k)) = floor(log_4(n))+1. Proof by Nikolaus Meyberg.
Dirichlet g.f. (conjectured): L(chi_2(3),s)/(1-2^(-s)), with chi_2(3) the nontrivial Dirichlet character modulo 3. - Ralf Stephan, Mar 27 2015
a(2*n + 1) = A057078(n). a(3*n) = 0. a(3*n + 1) = A098725(n+1). - Michael Somos, Jun 16 2015
EXAMPLE
G.f. = x + x^4 - x^5 + x^7 - x^11 + x^13 + x^16 - x^17 + x^19 - x^20 - x^23 + ...
MATHEMATICA
a[ n_] := If[n < 1, 0, With[ {f = #/(1 + # + #^2) &}, SeriesCoefficient[ Sum[ f[x^2^k], {k, 0, Log[2, n]}], {x, 0, n}]]]; (* Michael Somos, Jun 16 2015 *)
f[p_, e_] := If[Mod[p, 6] == 1, 1, (-1)^e]; f[2, e_] := (1 + (-1)^e)/2; f[3, e_] := 0; a[n_] := Times @@ f @@@ FactorInteger[n]; a[0] = 0; a[1] = 1; Array[a, 100, 0] (* Amiram Eldar, Sep 04 2023 *)
PROG
(PARI) {a(n) = my(A, m); if( n<1, 0, A = O(x); m=1; while( m<=n, m*=2; A = x / (1 + x + x^2) + subst(A, x, x^2)); polcoeff(A, n))}; /* Michael Somos, Jul 18 2004 */
(PARI) {a(n) = my(A, p, e); if( n<1, 0, A = factor(n); prod(k=1, matsize(A)[1], [p, e] = A[k, ]; if( p==2, !(e%2), p==3, 0, kronecker( -12, p)^e)))}; /* Michael Somos, Jun 16 2015 */
(PARI) {a(n) = if( n<1, 0, direuler( p=1, n, if( p==2, 1 / (1 - X^2), p==3, 1, 1 / (1 - kronecker( -12, p) * X)))[n])}; /* Michael Somos, Jun 16 2015 */
CROSSREFS
Cf. A002487.
Positions of 0 are in A084090, of 1 in A084089, of -1 in A084088, of a(n)!=0 in A084087.
Sequence in context: A244735 A245938 A176405 * A368463 A080846 A082401
KEYWORD
sign,easy,mult
AUTHOR
Ralf Stephan, May 11 2003
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 8 10:35 EDT 2024. Contains 372332 sequences. (Running on oeis4.)