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-3 of 3 results.

A335062 a(n) = 1 - Sum_{d|n, d > 1} (-1)^d * a(n/d).

Original entry on oeis.org

1, 0, 2, 0, 2, -2, 2, 0, 4, -2, 2, 0, 2, -2, 6, 0, 2, -8, 2, 0, 6, -2, 2, 0, 4, -2, 8, 0, 2, -14, 2, 0, 6, -2, 6, 4, 2, -2, 6, 0, 2, -14, 2, 0, 16, -2, 2, 0, 4, -8, 6, 0, 2, -24, 6, 0, 6, -2, 2, 8, 2, -2, 16, 0, 6, -14, 2, 0, 6, -14, 2, 0, 2, -2, 16, 0, 6, -14, 2, 0, 16
Offset: 1

Views

Author

Ilya Gutkovskiy, May 21 2020

Keywords

Comments

Inverse Moebius transform of A308077.

Crossrefs

Cf. A048298, A065091 (positions of 2's), A067824, A067856, A308077, A325144, A335283.

Programs

  • Mathematica
    a[n_] := a[n] = 1 - DivisorSum[n, (-1)^# a[n/#] &, # > 1 &]; Table[a[n], {n, 1, 81}]
  • PARI
    lista(nn) = {my(va = vector(nn)); for (n=1, nn, va[n] = 1 - sumdiv(n, d, if (d>1, (-1)^d*va[n/d]));); va;} \\ Michel Marcus, May 22 2020

Formula

G.f. A(x) satisfies: A(x) = x / (1 - x) - Sum_{k>=2} (-1)^k * A(x^k).

A343370 a(1) = 1; a(n) = Sum_{d|n, d < n} (-1)^d * a(d).

Original entry on oeis.org

1, -1, -1, -2, -1, -1, -1, -4, 0, -1, -1, -4, -1, -1, 1, -8, -1, -2, -1, -4, 1, -1, -1, -12, 0, -1, 0, -4, -1, -3, -1, -16, 1, -1, 1, -10, -1, -1, 1, -12, -1, -3, -1, -4, 0, -1, -1, -32, 0, -2, 1, -4, -1, -4, 1, -12, 1, -1, -1, -16, -1, -1, 0, -32, 1, -3, -1, -4, 1, -3, -1, -36, -1, -1, 0, -4, 1, -3, -1, -32, 0
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 12 2021

Keywords

Crossrefs

Cf. A008683, A053850 (positions of 0's), A056913 (positions of 1's), A067856, A074206, A307778, A308077, A325144.

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<2, 1,
          add((-1)^d*a(d), d=numtheory[divisors](n) minus {n}))
        end:
    seq(a(n), n=1..70);  # Alois P. Heinz, Apr 12 2021
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Sum[If[d < n, (-1)^d a[d], 0], {d, Divisors[n]}]; Table[a[n], {n, 70}]
  • PARI
    memoA343370 = Map();
    A343370(n) = if(1==n,1,my(v); if(mapisdefined(memoA343370,n,&v), v, v = sumdiv(n,d,if(dA343370(d),0)); mapput(memoA343370,n,v); (v))); \\ Antti Karttunen, Jan 02 2023

Formula

G.f.: x + Sum_{n>=1} (-1)^n * a(n) * x^(2*n) / (1 - x^n).

Extensions

Data section extended up to a(81) by Antti Karttunen, Jan 02 2023

A351407 a(1) = 1; a(n+1) = Sum_{d|n} (-1)^(n/d) * a(d).

Original entry on oeis.org

1, -1, 2, -3, 3, -4, 8, -9, 6, -9, 14, -15, 16, -17, 27, -33, 21, -22, 36, -37, 34, -45, 61, -62, 51, -55, 73, -82, 76, -77, 124, -125, 80, -97, 120, -132, 132, -133, 171, -190, 153, -154, 221, -222, 194, -233, 296, -297, 239, -248, 313, -337, 301, -302
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 10 2022

Keywords

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n=1, 1,
          add((-1)^((n-1)/d)*a(d), d=numtheory[divisors](n-1)))
        end:
    seq(a(n), n=1..54);  # Alois P. Heinz, Feb 10 2022
  • Mathematica
    a[1] = 1; a[n_] := a[n] = Sum[(-1)^((n - 1)/d) a[d], {d, Divisors[n - 1]}]; Table[a[n], {n, 1, 54}]
    nmax = 54; A[] = 0; Do[A[x] = x (1 + Sum[(-1)^k A[x^k], {k, 1, nmax}]) + O[x]^(nmax + 1) //Normal, nmax + 1]; CoefficientList[A[x], x] // Rest

Formula

G.f. A(x) satisfies: A(x) = x * ( 1 - A(x) + A(x^2) - A(x^3) + A(x^4) - A(x^5) + ... ).
G.f.: x * ( 1 - Sum_{n>=1} a(n) * x^n / (1 + x^n) ).
Showing 1-3 of 3 results.