OFFSET
0,2
COMMENTS
a(n) is the product over the primes <= n+1 which satisfy the weak Clausen condition. The weak Clausen condition relaxes the Clausen condition (p-1)|n by logical disjunction with p|(n+1).
LINKS
Peter Luschny, Table of n, a(n) for n = 0..100
Peter Luschny, Generalized Bernoulli numbers.
EXAMPLE
a(20) = 2310 = 2*3*5*7*11, because {3, 7} are divisors of 21 and {2, 5, 11} meet the Clausen condition 'p-1 divides n'.
MAPLE
MATHEMATICA
a[n_] := Product[ If[ Divisible[n+1, p] || Divisible[n, p-1], p, 1], {p, Prime /@ Range @ PrimePi[n+1]}]; Table[a[n], {n, 0, 57}] (* Jean-François Alcover, Jun 07 2013 *)
PROG
(Sage)
def divides(a, b): return b % a == 0
def A225481(n):
return mul(filter(lambda p: divides(p, n+1) or divides(p-1, n), primes(n+2)))
[A225481(n) for n in (0..57)]
(Haskell)
a225481 n = product [p | p <- takeWhile (<= n + 1) a000040_list,
mod n (p - 1) == 0 || mod (n + 1) p == 0]
-- Reinhard Zumkeller, Jun 10 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, May 29 2013
STATUS
approved