OFFSET
0,6
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
Peter Luschny, Generalized Bernoulli numbers.
EXAMPLE
a(41) = 21 = 3*7 = product({2,3,7} setminus {2}).
MAPLE
MATHEMATICA
a[n_] := Times @@ Select[ FactorInteger[n+1][[All, 1]], !Divisible[n, #-1] &]; a[0] = 1; Table[a[n], {n, 0, 77}] (* Jean-François Alcover, Jun 27 2013, after Maple *)
PROG
(Sage)
def A226040(n):
F = filter(lambda p: ((n+1) % p == 0) and (n % (p-1)), primes(n))
return mul(F)
[A226040(n) for n in (0..77)]
(PARI) a(n)=my(f=factor(n+1)[, 1], s=1); prod(i=1, #f, if(n%(f[i]-1), f[i], 1)) \\ Charles R Greathouse IV, Jun 27 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, May 26 2013
STATUS
approved