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.

A378220 Dirichlet inverse of phi(A003961(n)), where A003961 is fully multiplicative function with a(prime(i)) = prime(i+1).

Original entry on oeis.org

1, -2, -4, -2, -6, 8, -10, -2, -4, 12, -12, 8, -16, 20, 24, -2, -18, 8, -22, 12, 40, 24, -28, 8, -6, 32, -4, 20, -30, -48, -36, -2, 48, 36, 60, 8, -40, 44, 64, 12, -42, -80, -46, 24, 24, 56, -52, 8, -10, 12, 72, 32, -58, 8, 72, 20, 88, 60, -60, -48, -66, 72, 40, -2, 96, -96, -70, 36, 112, -120, -72, 8, -78, 80, 24
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2024

Keywords

Crossrefs

Dirichlet inverse of A003972.
Inverse Möbius transform of A346234.
After the initial term, A349385 doubled.

Programs

  • Mathematica
    f[p_, e_] := 1 - NextPrime[p]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 13 2025 *)
  • PARI
    A378220(n) = factorback(apply(p -> 1-nextprime(1+p), factor(n)[, 1]));
    
  • Python
    from math import prod
    from sympy import nextprime, primefactors
    def A378220(n): return prod(1-nextprime(p) for p in primefactors(n)) # Chai Wah Wu, Nov 23 2024

Formula

Multiplicative with a(p^e) = (1-q), where q = A151800(p), i.e., the least prime > p.
a(n) = A023900(A003961(n)).
For n > 1, a(n) = 2*A349385(n).
a(n) = Sum_{d|n} A346234(d).
a(n) = Sum_{d|n} A346246(d)*A378216(n/d).