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.

A347092 Dirichlet inverse of A322577, which is the convolution of Dedekind psi with Euler phi.

Original entry on oeis.org

1, -4, -6, 5, -10, 24, -14, -4, 10, 40, -22, -30, -26, 56, 60, 5, -34, -40, -38, -50, 84, 88, -46, 24, 26, 104, -6, -70, -58, -240, -62, -4, 132, 136, 140, 50, -74, 152, 156, 40, -82, -336, -86, -110, -100, 184, -94, -30, 50, -104, 204, -130, -106, 24, 220, 56, 228, 232, -118, 300, -122, 248, -140, 5, 260, -528, -134
Offset: 1

Views

Author

Antti Karttunen, Aug 18 2021

Keywords

Comments

Multiplicative because A322577 is.

Crossrefs

Programs

  • Haskell
    import Math.NumberTheory.Primes
    a n = product . map (\(p, e) -> if even e then 1 + unPrime p^2 else -2*unPrime p) . factorise $ n -- Sebastian Karlsson, Oct 29 2021
    
  • Mathematica
    f[p_, e_] := If[EvenQ[e], p^2 + 1, -2*p]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 23 2023 *)
  • PARI
    up_to = 16384;
    A001615(n) = if(1==n,n, my(f=factor(n)); prod(i=1, #f~, f[i, 1]^f[i, 2] + f[i, 1]^(f[i, 2]-1))); \\ After code in A001615
    A322577(n) = sumdiv(n,d,A001615(n/d)*eulerphi(d));
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA322577(n)));
    A347092(n) = v347092[n];
    
  • PARI
    A347092(n) = { my(f=factor(n)); prod(i=1, #f~, if(f[i, 2]%2, -2*f[i, 1], 1+(f[i, 1]^2))); }; \\ (after Sebastian Karlsson's multiplicative formula) - Antti Karttunen, Nov 11 2021
    
  • Python
    from sympy import factorint, prod
    def f(p, e): return 1 + p**2 if e%2 == 0 else -2*p
    def a(n):
        factors = factorint(n)
        return prod(f(p, factors[p]) for p in factors) # Sebastian Karlsson, Oct 29 2021

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A322577(n/d) * a(d).
a(n) = A347093(n) - A322577(n).
From Sebastian Karlsson, Oct 29 2021: (Start)
Dirichlet g.f.: zeta(2*s)/zeta(s-1)^2.
a(n) = Sum_{d|n} A323363(n/d)*A023900(d).
Multiplicative with a(p^e) = 1 + p^2 if e is even, -2*p if e is odd. (End)