OFFSET
1,1
EXAMPLE
The positive integers that are <= 9 and are coprime to 9 are 1,2,4,5,7,8.
So a(9) = (1+1)(1+2)(1+4)(1+5)(1+7)(1+8) = 2*3*5*6*8*9 = 12960.
MAPLE
a:=proc(n) local p, k: p:=1: for k to n do if gcd(k, n)=1 then p:=p*(1+k) else end if end do: p end proc: seq(a(n), n=1..22); # Emeric Deutsch, Sep 05 2007
for n to 25 do pr:=1: for k to n do if gcd(k, n)=1 then pr:=pr*(1+k) else end if end do: a[n]:=pr end do: seq(a[n], n=1..25); # Emeric Deutsch, Aug 28 2007
MATHEMATICA
Table[Times @@ (1 + Select[Range[n], GCD[ #, n] == 1 &]), {n, 1, 40}] (* Stefan Steinerberger, Sep 14 2007 *)
PROG
(PARI) rr(n) = pp=1; for(i=1, n, if(gcd(i, n)==1, pp=pp*(1+i))); return(pp); for(j=1, 60, print1(rr(j), ", ")) \\ Matthew Conroy, Sep 05 2007
CROSSREFS
KEYWORD
nonn
AUTHOR
Leroy Quet, Aug 26 2007
STATUS
approved