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.

A348956 a(0) = 1; a(n) = Sum_{d|n, d < n} (-1)^(n/d + 1) * a(d - 1).

Original entry on oeis.org

1, 0, -1, 1, -1, 1, 0, 1, -2, 0, 0, 1, 0, 1, -1, -1, -3, 1, 3, 1, 1, 0, -1, 1, -2, 0, -1, -2, -1, 1, 3, 1, -2, 0, 2, 0, 2, 1, -4, 0, -1, 1, 1, 1, 0, -4, 0, 1, -6, 1, 2, -3, 0, 1, 5, 0, 0, 3, 0, 1, 3, 1, -4, -1, -3, 0, 3, 1, 3, -1, -1, 1, 0, 1, -3, -4, -4, 1, 5, 1, -4
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 04 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = Sum[If[d < n, (-1)^(n/d + 1) a[d - 1], 0], {d, Divisors[n]}]; Table[a[n], {n, 0, 80}]
    nmax = 80; A[] = 0; Do[A[x] = 1 - Sum[(-x)^k A[x^k], {k, 2, nmax}] + O[x]^(nmax + 1) //Normal, nmax + 1]; CoefficientList[A[x], x]
  • PARI
    A348956(n) = if(!n,1,sumdiv(n,d,if(dA348956(d-1)*(-1)^(1 + (n/d)),0))); \\ Antti Karttunen, Nov 05 2021

Formula

G.f. A(x) satisfies: A(x) = 1 - x^2 * A(x^2) + x^3 * A(x^3) - x^4 * A(x^4) + ...

A343493 a(n) = 1 - Sum_{d|n, d < n} a(d - 1).

Original entry on oeis.org

1, 1, 0, 0, -1, 0, -1, 0, -1, 0, 0, 0, -1, 0, 0, 1, -1, 0, 0, 0, 0, 1, -1, 0, -1, 1, 0, 1, 0, 0, 0, 0, -2, 0, 0, 2, 0, 0, -1, 1, 0, 0, 0, 0, -2, 2, 0, 0, -2, 1, 1, 1, -1, 0, 0, 1, -1, 0, -1, 0, 0, 0, -1, 2, -2, 2, 0, 0, 0, 1, 1, 0, -2, 0, -1, 2, -1, 1, 0, 0, -2, 1, -1, 0, -1, 2, -1, 0, -2, 0, 3
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 17 2021

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = 1 - Sum[If[d < n, a[d - 1], 0], {d, Divisors[n]}]; Table[a[n], {n, 0, 90}]
    nmax = 90; A[] = 0; Do[A[x] = 1/(1 - x) - Sum[x^k A[x^k], {k, 2, nmax}] + O[x]^(nmax + 1) //Normal, nmax + 1]; CoefficientList[A[x], x]
  • Python
    from functools import lru_cache
    from sympy import divisors
    @lru_cache(maxsize=None)
    def A343493(n): return 1-sum(A343493(d-1) for d in divisors(n) if d < n) # Chai Wah Wu, Apr 17 2021

Formula

G.f. A(x) satisfies: A(x) = 1 / (1 - x) - x^2 * A(x^2) - x^3 * A(x^3) - x^4 * A(x^4) - ...
Showing 1-2 of 2 results.