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.
%I A003966 #41 Feb 11 2023 08:20:15 %S A003966 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, %T A003966 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, %U A003966 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 %N A003966 Möbius transform of A003958. %H A003966 Antti Karttunen, <a href="/A003966/b003966.txt">Table of n, a(n) for n = 1..16384</a> %H A003966 Antti Karttunen, <a href="/A003966/a003966.txt">Data supplement: n, a(n) computed for n = 1..100000 </a> %F A003966 Multiplicative with a(p^e) = (p-2)(p-1)^(e-1). - _David W. Wilson_, Sep 01 2001 %F A003966 Dirichlet inverse b(n) is multiplicative with b(p^e) = 2-p for prime p and e > 0 (A276833). - _Werner Schulte_, Oct 25 2018 %F A003966 Sum_{k=1..n} a(k) ~ c * n^2, where c = 2*Pi^2/(105*zeta(3)) = 0.1563923... . - _Amiram Eldar_, Oct 23 2022 %F A003966 From _Vaclav Kotesovec_, Feb 11 2023: (Start) %F A003966 Dirichlet g.f.: 1/zeta(s) * Product_{p prime} 1 / (1 - p^(1-s) + p^(-s)). %F A003966 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) %p A003966 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: %p A003966 seq(A003966(n),n=1..100) ; # _R. J. Mathar_, Jan 07 2011 %t A003966 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 *) %o A003966 (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 %o A003966 (PARI) %o A003966 A003958(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1]--); factorback(f); %o A003966 A003966(n) = sumdiv(n,d,moebius(n/d)*A003958(d)); \\ _Antti Karttunen_, Oct 24 2018 %o A003966 (PARI) for(n=1, 100, print1(direuler(p=2, n, 1/(1-p*X+X)*(1-X))[n], ", ")) \\ _Vaclav Kotesovec_, Feb 11 2023 %Y A003966 Cf. A003958, A276833. %K A003966 nonn,mult %O A003966 1,5 %A A003966 _Marc LeBrun_ %E A003966 More terms from _Antti Karttunen_, Oct 24 2018