OFFSET
1,4
COMMENTS
From Bernard Schott, Feb 01 2019: (Start)
a(n) = 1 iff n = 1 or n is prime.
a(n) = n when n > 1 iff n has exactly four divisors, equally, iff n is either the cube of a prime or the product of two different primes, so iff n belongs to A030513 (very nice proof in Sierpiński).
a(p^3) = 1 * p * p^2 = p^3; a(p*q) = 1 * p * q = p*q.
REFERENCES
József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 1, p. 57.
Wacław Sierpiński, Elementary Theory of Numbers, Ex. 2 p. 174, Warsaw, 1964.
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000 (terms 1..1000 from T. D. Noe)
Zhu Weiyi, On the divisor product sequences, Smarandache Notions J., Vol. 14 (2004), pp. 144-146.
FORMULA
Sum_{k=1..n} 1/a(k) ~ pi(n) + log(log(n))^2 + c_1*log(log(n)) + c_2 + O(log(log(n))/log(n)), where pi(n) = A000720(n) and c_1 and c_2 are constants (Weiyi, 2004; Sandor and Crstici, 2004). - Amiram Eldar, Oct 29 2022
EXAMPLE
a(18) = 1 * 2 * 3 * 6 * 9 = 324. - Bernard Schott, Jan 31 2019
MAPLE
A007956 := n -> mul(i, i=op(numtheory[divisors](n) minus {1, n}));
seq(A007956(i), i=1..79); # Peter Luschny, Mar 22 2011
MATHEMATICA
Table[Times@@Most[Divisors[n]], {n, 65}] (* Alonso del Arte, Apr 18 2011 *)
a[n_] := n^(DivisorSigma[0, n]/2 - 1); Table[a[n], {n, 1, 65}] (* Jean-François Alcover, Oct 07 2013 *)
PROG
(PARI) A007956(n) = local(a); a=1; fordiv(n, d, a=a*d); a/n \\ Michael B. Porter, Dec 01 2009
(PARI) a(n)=my(k); if(issquare(n, &k), k^(numdiv(n)-2), n^(numdiv(n)/2-1)) \\ Charles R Greathouse IV, Oct 15 2015
(Haskell)
a007956 = product . a027751_row
-- Reinhard Zumkeller, Feb 04 2013, Nov 02 2011
(Python)
from math import isqrt
from sympy import divisor_count
def A007956(n): return isqrt(n)**(d-2) if (d:=divisor_count(n))&1 else n**((d>>1)-1) # Chai Wah Wu, Jun 18 2023
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
R. Muller
EXTENSIONS
More terms from Scott Lindhurst (ScottL(AT)alumni.princeton.edu)
STATUS
approved