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 A166589 #22 Jan 20 2024 03:11:40 %S A166589 1,-1,0,1,2,0,4,-1,0,-2,8,0,10,-4,0,1,14,0,16,2,0,-8,20,0,4,-10,0,4, %T A166589 26,0,28,-1,0,-14,8,0,34,-16,0,-2,38,0,40,8,0,-20,44,0,16,-4,0,10,50, %U A166589 0,16,-4,0,-26,56,0,58,-28,0,1,20,0,64,14,0,-8,68,0 %N A166589 Totally multiplicative sequence with a(p) = p-3 for prime p. %H A166589 Amiram Eldar, <a href="/A166589/b166589.txt">Table of n, a(n) for n = 1..10000</a> %F A166589 Multiplicative with a(p^e) = (p-3)^e. If n = Product p(k)^e(k) then a(n) = Product (p(k)-3)^e(k). a(3k) = 0 for k >= 1. Abs (a(2^k)) = 1 for k >= 1. %F A166589 Sum_{k=1..n} a(k) ~ c * n^2 / 2, where c = Product_{p prime} (p*(p-1)/(p^2-p+3)) = 0.196347937547... . - _Amiram Eldar_, Jan 20 2024 %t A166589 a[1] = 1; a[p_?PrimeQ] := p-3; a[n_] := Times @@ Power @@@ ({#[[1]]-3, #[[2]]}& /@ FactorInteger[n]); Array[a, 72] (* _Jean-François Alcover_, Jul 19 2017 *) %o A166589 (PARI) a(n) = my(f=factor(n)); for (i=1, #f~, f[i,1] -=3); factorback(f); \\ _Michel Marcus_, Jun 09 2014 %Y A166589 Cf. A166586. %K A166589 sign,easy,mult %O A166589 1,5 %A A166589 _Jaroslav Krizek_, Oct 17 2009 %E A166589 More terms from _Michel Marcus_, Jun 09 2014