OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..335
FORMULA
MATHEMATICA
A[n_]:= If[n<1, 0, Block[{k=1}, While[Prime[n + k - 1] > Prime[k]^2, k++]; k - 1]]; a[n_]:=If[n<2, n + 1, Product[Prime[i], {i, A[n] + 1, A[n] + n}]]; Table[a[n], {n, 0, 51}] (* Indranil Ghosh, Mar 24 2017 *)
PROG
(Scheme) (define (A284262 n) (A242378bi (A284263 n) (A002110 n))) ;; Where A242378bi(k, n) applies prime shift A003961(n) k times. See A242378.
(PARI) A(n) = { my(k=1); if(0==n, 0, while(prime(n+k-1) > (prime(k)^2), k = k+1); (k-1)); };
a(n) = prod(i=A(n) + 1, A(n) + n, prime(i));
for(n=0, 51, print1(a(n), ", ")) \\ Indranil Ghosh, after Antti Karttunen, Mar 24 2017
(Python)
from sympy import prime
from operator import mul
from functools import reduce
def A(n):
if n<1: return 0
k=1
while prime(n + k - 1)>prime(k)**2:k+=1
return k - 1
def a(n): return n + 1 if n<2 else reduce(mul, [prime(i) for i in range(A(n) + 1, A(n) + n + 1)])
print([a(n) for n in range(21)]) # Indranil Ghosh, Mar 24 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Antti Karttunen, Mar 24 2017
STATUS
approved