OFFSET
1,1
COMMENTS
a(n) is a square when n is not a square or of the form (2m^2)^2 = 4m^4.
If n is prime, then a(n) = (n+1)^2. - Wesley Ivan Hurt, Apr 19 2021
LINKS
T. D. Noe, Table of n, a(n) for n = 1..1000
FORMULA
MATHEMATICA
Times@@(#/Divisors[ # ]+Divisors[ # ])& /@ Range[ 48 ]
PROG
(Haskell)
a045661 n = product [n'+d | d <- [1..n], let (n', m) = divMod n d, m == 0]
-- Reinhard Zumkeller, Feb 02 2012, Jan 25 2012
(PARI) a(n)=my(t=1); fordiv(n, d, t*=n/d+d); t \\ Charles R Greathouse IV, Jan 25 2012
(PARI) A045661(n)=my(t=1+#n=divisors(n)); prod(i=1, (t-1)\2, n[i]+n[t-i])^2*if(bittest(t, 0), 1, 2*n[t\2]) \\ M. F. Hasler, Jan 25 2012
CROSSREFS
KEYWORD
nonn,nice,easy
AUTHOR
STATUS
approved