OFFSET
1,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 1..1000
FORMULA
MAPLE
f:=n -> mul((8*t[1]-2)^t[2], t=ifactors(n)[2]):
map(f, [$1..100]); # Robert Israel, Jun 06 2016
MATHEMATICA
a[1] = 1; a[n_] := (fi = FactorInteger[n]; Times @@ ((4*fi[[All, 1]] - 1)^fi[[All, 2]])); Table[a[n]*2^PrimeOmega[n], {n, 1, 100}] (* G. C. Greubel, Jun 06 2016 *)
f[p_, e_] := (8*p-2))^e; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Oct 18 2023 *)
PROG
(PARI) a(n) = {my(f=factor(n)); for (k=1, #f~, f[k, 1] = 8*f[k, 1]-2; ); factorback(f); } \\ Michel Marcus, Jun 06 2016
CROSSREFS
KEYWORD
nonn,easy,mult
AUTHOR
Jaroslav Krizek, Nov 01 2009
STATUS
approved