A167319 Totally multiplicative sequence with a(p) = 9*(p-3) for prime p.
1, -9, 0, 81, 18, 0, 36, -729, 0, -162, 72, 0, 90, -324, 0, 6561, 126, 0, 144, 1458, 0, -648, 180, 0, 324, -810, 0, 2916, 234, 0, 252, -59049, 0, -1134, 648, 0, 306, -1296, 0, -13122, 342, 0, 360, 5832, 0, -1620, 396, 0, 1296, -2916, 0, 7290, 450, 0, 1296, -26244
Offset: 1
Links
- G. C. Greubel, Table of n, a(n) for n = 1..1000
Programs
-
Mathematica
a[1] = 1; a[n_] := (fi = FactorInteger[n]; Times @@ ((fi[[All, 1]] - 3)^fi[[All, 2]])); Table[a[n]*9^PrimeOmega[n], {n, 1, 100}] (* G. C. Greubel, Jun 09 2016 *) f[p_, e_] := (9*(p-3))^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 22 2023 *)