OFFSET
2,1
LINKS
Robert Israel, Table of n, a(n) for n = 2..366
FORMULA
a(p) = (2p)!/p! if p is a prime.
a(n) = (n+A007917(n))!/n!. - Robert Israel, Aug 18 2019
EXAMPLE
a(6) = 7*8*9*10*11 = 55440.
MAPLE
p:=proc(n) if isprime(n)=true then n else prevprime(n) fi end: a:=n->product(n+j, j=1..p(n)): seq(a(n), n=2..19); # p is a modified prevprime command (for n prime yields n rather than the previous prime) # Emeric Deutsch, Aug 07 2005
# Simpler alternative:
seq((n+prevprime(n+1))!/n!, n=2..20); # Robert Israel, Aug 18 2019
MATHEMATICA
Table[Pochhammer[n+1, NextPrime[n+1, -1]], {n, 2, 20}] (* Jean-François Alcover, Jul 19 2020 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Amarnath Murthy, Aug 01 2005
EXTENSIONS
More terms from Emeric Deutsch, Aug 07 2005
STATUS
approved