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.

A003966 Möbius transform of A003958.

Original entry on oeis.org

1, 0, 1, 0, 3, 0, 5, 0, 2, 0, 9, 0, 11, 0, 3, 0, 15, 0, 17, 0, 5, 0, 21, 0, 12, 0, 4, 0, 27, 0, 29, 0, 9, 0, 15, 0, 35, 0, 11, 0, 39, 0, 41, 0, 6, 0, 45, 0, 30, 0, 15, 0, 51, 0, 27, 0, 17, 0, 57, 0, 59, 0, 10, 0, 33, 0, 65, 0, 21, 0, 69, 0, 71, 0, 12, 0, 45, 0, 77, 0, 8, 0, 81, 0, 45, 0, 27, 0, 87, 0, 55, 0, 29, 0, 51, 0, 95, 0, 18
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    A003966 := proc(n) option remember; local pf,p ; if n = 1 then 1; else pf := ifactors(n)[2] ; if nops(pf) = 1 then p := op(1,pf) ; (op(1,p)-2)*(op(1,p)-1)^(op(2,p)-1)  ; else mul(procname(op(1,p)^op(2,p)),p=pf) ; end if; end if; end proc:
    seq(A003966(n),n=1..100) ; # R. J. Mathar, Jan 07 2011
  • Mathematica
    f[p_, e_] := (p - 2) (p - 1)^(e - 1); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 23 2022 *)
  • PARI
    a(n) = {my(f=factor(n)); for (i=1, #f~, p = f[i, 1]; f[i, 1] = (p-2)*(p-1)^(f[i,2]-1); f[i, 2] = 1); factorback(f);} \\ Michel Marcus, Feb 27 2015
    
  • PARI
    A003958(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1]--); factorback(f);
    A003966(n) = sumdiv(n,d,moebius(n/d)*A003958(d)); \\ Antti Karttunen, Oct 24 2018
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, 1/(1-p*X+X)*(1-X))[n], ", ")) \\ Vaclav Kotesovec, Feb 11 2023

Formula

Multiplicative with a(p^e) = (p-2)(p-1)^(e-1). - David W. Wilson, Sep 01 2001
Dirichlet inverse b(n) is multiplicative with b(p^e) = 2-p for prime p and e > 0 (A276833). - Werner Schulte, Oct 25 2018
Sum_{k=1..n} a(k) ~ c * n^2, where c = 2*Pi^2/(105*zeta(3)) = 0.1563923... . - Amiram Eldar, Oct 23 2022
From Vaclav Kotesovec, Feb 11 2023: (Start)
Dirichlet g.f.: 1/zeta(s) * Product_{p prime} 1 / (1 - p^(1-s) + p^(-s)).
Dirichlet g.f.: zeta(s-1) * Product_{p prime} (1 + (p^(1-s)-2) / (1 - p + p^s)), (with a product that converges for s=2). (End)

Extensions

More terms from Antti Karttunen, Oct 24 2018