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.

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