cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-2 of 2 results.

A084091 Expansion of Sum_{k>=0} x^2^k/(1+x^2^k+x^2^(k+1)).

Original entry on oeis.org

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
Offset: 0

Views

Author

Ralf Stephan, May 11 2003

Keywords

Comments

Chances of values -1/0/+1 are ~ 2:5:2.

Examples

			G.f. = x + x^4 - x^5 + x^7 - x^11 + x^13 + x^16 - x^17 + x^19 - x^20 - x^23 + ...
		

Crossrefs

Cf. A002487.
Positions of 0 are in A084090, of 1 in A084089, of -1 in A084088, of a(n)!=0 in A084087.
Cf. A373155 (from term a(1) onward absolute values, also parity of terms).

Programs

  • 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 *)
  • 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 */
    
  • PARI
    A084091(n) = if(!n, n, my(f = factor(n)); prod(k=1, #f~, if(2==f[k, 1], !(f[k, 2]%2), if(2==(f[k, 1]%3), (-1)^f[k, 2], f[k, 1]%3)))); \\ Antti Karttunen, May 28 2024

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

A084087 Numbers k not divisible by 3 such that the exponent of the highest power of 2 dividing k is even.

Original entry on oeis.org

1, 4, 5, 7, 11, 13, 16, 17, 19, 20, 23, 25, 28, 29, 31, 35, 37, 41, 43, 44, 47, 49, 52, 53, 55, 59, 61, 64, 65, 67, 68, 71, 73, 76, 77, 79, 80, 83, 85, 89, 91, 92, 95, 97, 100, 101, 103, 107, 109, 112, 113, 115, 116, 119, 121, 124, 125, 127, 131
Offset: 1

Views

Author

Ralf Stephan, May 11 2003

Keywords

Comments

Numbers that are in both A001651 and A003159.
Numbers that are in either A084088 or A084089.
Complement of union of ({k==0 (mod 3)}, {2a(n)}) (A084090).
It seems that lim_{n->infinity} a(n)/n = 9/4. [This is true. The asymptotic density of this sequence is 4/9. - Amiram Eldar, Jan 16 2022]
Positions of nonzero coefficients in the expansion of Sum_{k>=0} x^2^k/(1 + x^2^k + x^2^(k+1)) (A084091).

Crossrefs

Disjoint union of A084089 and A084090.
Intersection of A001651 and A003159.
Also subsequence of A036668, A339690.

Programs

  • Mathematica
    Select[Range[200],Mod[#,3]!=0&&EvenQ[IntegerExponent[#,2]]&] (* Harvey P. Dale, May 15 2018 *)
  • PARI
    for(n=0,100,if(valuation(n,2)%2==0&&n%3,print1(n",")))
Showing 1-2 of 2 results.