OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Multiplicative with a(2^e) = 2^(4*e-3) and a(p^e) = power of 2 in prime factorization of (p - 1)*(p^2-1) for an odd prime p. - Vladeta Jovovic, Apr 17 2002
MATHEMATICA
f[p_, e_] := 2^IntegerExponent[(p-1)*(p^2-1), 2]; f[2, e_] := 2^(4*e-3); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Nov 02 2023 *)
PROG
(PARI) a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i, 1] == 2, 1 << (4*f[i, 2]-3), 1 << valuation((f[i, 1]-1)*(f[i, 1]^2-1), 2))); } \\ Amiram Eldar, Nov 03 2023
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Sharon Sela (sharonsela(AT)hotmail.com), Apr 14 2002
EXTENSIONS
More terms from Vladeta Jovovic, Apr 17 2002
STATUS
approved