OFFSET
1,2
FORMULA
6 divides a(n) for n >= 3. a(n) is squarefree. - Peter Luschny, Mar 30 2019
EXAMPLE
From Peter Luschny, Mar 30 2019: (Start)
n = 12 -> prime(12) - 1 = 37 - 1 = 36,
D = divisors(36) \ {36} = {1, 2, 3, 4, 6, 9, 12, 18},
P = {p: (p-1) in D, p prime} = {2, 3, 5, 7, 13, 19},
Product(P) = 51870 = a(n).
.
n = 18 -> prime(18) - 1 = 61 - 1 = 60,
D = divisors(60) \ {60} = {1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30},
P = {p: (p-1) in D, p prime} = = {2, 3, 5, 7, 11, 13, 31},
Product(P) = 930930 = a(n).
(End)
MAPLE
a := proc(n) if not isprime(n+1) then return NULL fi;
numtheory[divisors](n) minus {n};
map(i->i+1, %); mul(i, i=select(isprime, %)) end:
seq(a(n), n=1..226); # Peter Luschny, Mar 30 2019
MATHEMATICA
a[n_] := (p = Prime[n]; Denominator[ BernoulliB[p - 1]]/p); Table[a[n], {n, 1, 49}] (* Jean-François Alcover, Dec 13 2012 *)
CROSSREFS
KEYWORD
easy,nonn,frac
AUTHOR
Vladeta Jovovic, Jan 21 2006
STATUS
approved