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.

A355827 a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA302777(n/d) * a(d).

Original entry on oeis.org

1, -1, -1, 0, -1, 2, -1, 1, 0, 2, -1, -1, -1, 2, 2, -2, -1, -1, -1, -1, 2, 2, -1, -2, 0, 2, 1, -1, -1, -6, -1, 2, 2, 2, 2, 2, -1, 2, 2, -2, -1, -6, -1, -1, -1, 2, -1, 6, 0, -1, 2, -1, -1, -2, 2, -2, 2, 2, -1, 6, -1, 2, -1, 0, 2, -6, -1, -1, 2, -6, -1, 0, -1, 2, -1, -1, 2, -6, -1, 6, -2, 2, -1, 6, 2, 2, 2, -2, -1, 6, 2
Offset: 1

Views

Author

Antti Karttunen, Jul 19 2022

Keywords

Comments

Dirichlet inverse of function f(1) = 1, f(n) = A302777(n) for n > 1, which is the characteristic function of the union of {1} and "Fermi-Dirac primes", A050376.

Crossrefs

Cf. also A355817.

Programs

  • Mathematica
    s[n_] := If[n > 1 && Length[(f = FactorInteger[n])] == 1 && (e = f[[;; , 2]]) == 2^IntegerExponent[e, 2], 1, 0]; a[1] = 1; a[n_] := a[n] = -DivisorSum[n, s[n/#] * a[#] &, # < n &]; Array[a, 100] (* Amiram Eldar, Jul 19 2022 *)
  • PARI
    ispow2(n) = (n && !bitand(n,n-1));
    A302777(n) = ispow2(isprimepower(n));
    memoA355827 = Map();
    A355827(n) = if(1==n,1,my(v); if(mapisdefined(memoA355827,n,&v), v, v = -sumdiv(n,d,if(dA302777(n/d)*A355827(d),0)); mapput(memoA355827,n,v); (v)));

A355939 Dirichlet inverse of A080339, characteristic function of noncomposite numbers.

Original entry on oeis.org

1, -1, -1, 1, -1, 2, -1, -1, 1, 2, -1, -3, -1, 2, 2, 1, -1, -3, -1, -3, 2, 2, -1, 4, 1, 2, -1, -3, -1, -6, -1, -1, 2, 2, 2, 6, -1, 2, 2, 4, -1, -6, -1, -3, -3, 2, -1, -5, 1, -3, 2, -3, -1, 4, 2, 4, 2, 2, -1, 12, -1, 2, -3, 1, 2, -6, -1, -3, 2, -6, -1, -10, -1, 2, -3, -3, 2, -6, -1, -5, 1, 2, -1, 12, 2, 2, 2, 4, -1, 12, 2, -3, 2, 2, 2, 6, -1, -3, -3, 6, -1, -6, -1, 4, -6
Offset: 1

Views

Author

Antti Karttunen, Jul 21 2022

Keywords

Comments

The absolute values of this sequence are given by A008480. Compare also to A355817 and A335452.

Crossrefs

Programs

  • Mathematica
    s[n_] := If[CompositeQ[n], 0, 1]; a[1] = 1; a[n_] := a[n] = -DivisorSum[n, s[n/#]*a[#] &, # < n &]; Array[a, 100] (* Amiram Eldar, Jul 21 2022 *)
  • PARI
    memoA355939 = Map();
    A355939(n) = if(1==n,1,my(v); if(mapisdefined(memoA355939,n,&v), v, v = -sumdiv(n,d,if(dA355939(d),0)); mapput(memoA355939,n,v); (v)));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA010051(n/d) * a(d).
Dirichlet g.f.: 1/(1 + B(s)), where B(s) is d.g.f. of characteristic function of primes. - Vaclav Kotesovec, Jul 22 2022
Showing 1-2 of 2 results.