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.

A167345 Totally multiplicative sequence with a(p) = (p-1)*(p-2) = p^2-3p+2 for prime p.

This page as a plain text file.
%I A167345 #16 Dec 15 2022 06:15:46
%S A167345 1,0,2,0,12,0,30,0,4,0,90,0,132,0,24,0,240,0,306,0,60,0,462,0,144,0,8,
%T A167345 0,756,0,870,0,180,0,360,0,1260,0,264,0,1560,0,1722,0,48,0,2070,0,900,
%U A167345 0
%N A167345 Totally multiplicative sequence with a(p) = (p-1)*(p-2) = p^2-3p+2 for prime p.
%H A167345 G. C. Greubel, <a href="/A167345/b167345.txt">Table of n, a(n) for n = 1..1000</a>
%F A167345 Multiplicative with a(p^e) = ((p-1)*(p-2))^e. If n = Product p(k)^e(k) then a(n) = Product ((p(k)-1)*(p(k)-2))^e(k).
%F A167345 a(2k) = 0 for k >= 1.
%F A167345 a(n) = A003958(n) * A166586(n).
%F A167345 Sum_{k=1..n} a(k) ~ c * n^3, where c = (2/Pi^2) / Product_{p prime} (1 + 2/p^2 + 1/p^3 - 2/p^4) = 0.090842681006... . - _Amiram Eldar_, Dec 15 2022
%t A167345 a[1] = 1; a[n_] := (fi = FactorInteger[n]; Times @@ ((fi[[All, 1]] - 1)^fi[[All, 2]])); b[1] = 1; b[n_] := (fi = FactorInteger[n]; Times @@ ((fi[[All, 1]] - 2)^fi[[All, 2]])); Table[a[n]*b[n], {n, 1, 100}] (* _G. C. Greubel_, Jun 10 2016 *)
%Y A167345 Cf. A003958, A166586.
%K A167345 nonn,mult
%O A167345 1,3
%A A167345 _Jaroslav Krizek_, Nov 01 2009