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.

A328154 G.f. A(x) satisfies: A(x) = A(x^2) + x / (1 + x)^2.

Original entry on oeis.org

1, -1, 3, -5, 5, -3, 7, -13, 9, -5, 11, -15, 13, -7, 15, -29, 17, -9, 19, -25, 21, -11, 23, -39, 25, -13, 27, -35, 29, -15, 31, -61, 33, -17, 35, -45, 37, -19, 39, -65, 41, -21, 43, -55, 45, -23, 47, -87, 49, -25, 51, -65, 53, -27, 55, -91, 57, -29, 59, -75, 61, -31, 63, -125, 65
Offset: 1

Views

Author

Ilya Gutkovskiy, Oct 05 2019

Keywords

Crossrefs

Programs

  • Magma
    a:=[1]; for k in [1..65] do if IsOdd(k) then a[k]:=k; else a[k]:=a[k div 2]-k; end if;  end for; a; // Marius A. Burtea, Oct 07 2019
    
  • Mathematica
    nmax = 65; CoefficientList[Series[Sum[x^(2^k)/(1 + x^(2^k))^2, {k, 0, Floor[Log[2, nmax]] + 1}], {x, 0, nmax}], x] // Rest
    nmax = 65; CoefficientList[Series[Sum[(-1)^(k + 1) EulerPhi[2 k] x^k/(1 - x^k), {k, 1, nmax}], {x, 0, nmax}], x] // Rest
    a[n_] := If[EvenQ[n], a[n/2] - n, n]; Table[a[n], {n, 1, 65}]
  • PARI
    a(n) = if (n==1, 1, if (n % 2, n, a(n/2) - n)); \\ Michel Marcus, Oct 07 2019
    
  • PARI
    a(n) = 3*(n>>valuation(n,2)) - n<<1; \\ Kevin Ryde, Oct 06 2020

Formula

G.f.: Sum_{k>=0} x^(2^k) / (1 + x^(2^k))^2.
G.f.: Sum_{k>=1} (-1)^(k + 1) * phi(2*k) * x^k / (1 - x^k), where phi = A000010.
a(2*n) = a(n) - 2*n, a(2*n+1) = 2*n + 1.
From Werner Schulte, Oct 05 2020: (Start)
Multiplicative with a(2^e) = 3 - 2^(e+1) and a(p^e) = p^e for e >= 0 and prime p > 2.
Dirichlet g. f.: Sum_{n>0} a(n)/n^s = zeta(s-1) * (1-3/(2^s-1)). (End)