OFFSET
0,3
PROG
(Sage)
def A341108(n):
def L(n, p, r):
s, q = 0, p - r
while q <= n:
s += n // q
q *= p
return s
if n < 2: return 1
p = prod(p^(L(n, p, 1) - L(n+1, p, 0)) for p in primes(n+1))
q = prod(p for p in prime_divisors(n + 1))
return ((n + 1) // q) * p
print([A341108(n) for n in (0..28)])
(Julia)
[A341108(n) for n in 0:30] |> println
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Feb 07 2021
STATUS
approved