OFFSET
1,3
COMMENTS
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..10080
FORMULA
a(n) = Product_{p prime, p+1 divides n} p.
a(n) = denominator of Sum_{p prime, p+1 divides n} 1/p.
a(n) = Product_{d|n, d-1 is prime} (d-1), where d runs over the divisors of n.
a(2*n + 1) = 2, iff n == 1 (mod 3), else a(2*n + 1) = 1.
EXAMPLE
For n=12, the divisors of 12 are {1, 2, 3, 4, 6, 12}. The prime numbers p, such that p+1 is a divisor of 12, are {2, 3, 5, 11}, therefore a(12) = 2 * 3 * 5 * 11 = 330.
MAPLE
a:= n-> mul(`if`(isprime(d-1), d-1, 1), d=numtheory[divisors](n)):
seq(a(n), n=1..100); # Alois P. Heinz, Dec 29 2018
MATHEMATICA
Array[Apply[Times, Select[Divisors@ #, PrimeQ[# - 1] &] - 1 /. {} -> {1}] &, 69] (* Michael De Vlieger, Jan 07 2019 *)
PROG
(PARI) a(n) = my(d=divisors(n)); prod(k=1, #d, if(isprime(d[k]-1), d[k]-1, 1));
CROSSREFS
KEYWORD
nonn
AUTHOR
Daniel Suteu, Dec 23 2018
STATUS
approved