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 A166586 #42 Feb 10 2023 12:54:52 %S A166586 1,0,1,0,3,0,5,0,1,0,9,0,11,0,3,0,15,0,17,0,5,0,21,0,9,0,1,0,27,0,29, %T A166586 0,9,0,15,0,35,0,11,0,39,0,41,0,3,0,45,0,25,0,15,0,51,0,27,0,17,0,57, %U A166586 0,59,0,5,0,33,0,65,0,21,0,69,0,71,0,9,0 %N A166586 Totally multiplicative sequence with a(p) = p - 2 for prime p. %H A166586 G. C. Greubel, <a href="/A166586/b166586.txt">Table of n, a(n) for n = 1..1000</a> %F A166586 Multiplicative with a(p^e) = (p-2)^e. If n = Product p(k)^e(k) then a(n) = Product (p(k) - 2)^e(k). a(2k) = 0 for k >= 1. %F A166586 a(A000244(n)) = 1. - _Michel Marcus_, Dec 13 2014 %F A166586 Dirichlet g.f.: 1 / Product_{p prime} (1 - p^(1 - s) + 2*p^(-s)). The Dirichlet inverse is multiplicative with b(p) = 2 - p, b(p^e) = 0, for e > 1. - _Álvar Ibeas_, Nov 24 2017 [corrected by _Vaclav Kotesovec_, Feb 10 2023] %F A166586 Sum_{k=1..n} a(k) ~ c * n^2/2, where c = Product_{primes} (1 - 1/(1 + p*(p-1)/2)) = 0.3049173579282080265466051390930446635010608835584906520231313997... - _Vaclav Kotesovec_, Feb 10 2023 %p A166586 f:= proc(n) local t; %p A166586 mul((t[1]-2)^t[2],t=ifactors(n)[2]) %p A166586 end proc: %p A166586 map(f, [$1..100]); # _Robert Israel_, Jun 07 2016 %t A166586 a[1] = 1; a[n_] := (fi = FactorInteger[n]; Times @@ ((fi[[All, 1]] - 2)^fi[[All, 2]])); Table[a[n], {n, 1, 50}] (* _G. C. Greubel_, Jun 06 2016 *) %o A166586 (PARI) a(n) = my(f = factor(n)); for (i=1, #f~, f[i,1] -= 2); factorback(f); \\ _Michel Marcus_, Dec 13 2014 %o A166586 (PARI) for(n=1, 100, print1(direuler(p=2, n, 1/(1-p*X+2*X))[n], ", ")) \\ _Vaclav Kotesovec_, Feb 10 2023 %Y A166586 Cf. A000244 (powers of 3). %K A166586 nonn,mult %O A166586 1,5 %A A166586 _Jaroslav Krizek_, Oct 17 2009 %E A166586 More terms from _Alonso del Arte_, Dec 10 2014 %E A166586 a(69) and a(75) corrected by _G. C. Greubel_, Jun 06 2016 %E A166586 Erroneous formula and program removed by _G. C. Greubel_, Jun 06 2016