OFFSET
0,1
LINKS
David A. Corneth, Table of n, a(n) for n = 0..10000
EXAMPLE
a(0) = prime(0+1) = prime(1) = 2.
a(5) = prime(5+1) = prime(6) = 13.
a(20) = prime(2+1) * prime(0+1) = prime(3) * prime(1) = 5 * 2 = 10.
MAPLE
a:= n-> mul(ithprime(d+1), d=convert(n, base, 10)):
seq(a(n), n=0..171); # Alois P. Heinz, May 11 2023
PROG
(Python)
def a(n):
primes = (2, 3, 5, 7, 11, 13, 17, 19, 23, 29)
product = 1
for d in str(n):
product *= primes[int(d)]
return product
(PARI) a(n) = my(d=digits(n)); if (n==0, d=[0]); prod(k=1, #d, prime(d[k]+1)); \\ Michel Marcus, May 12 2023
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Fabian I. Garcia, May 11 2023
STATUS
approved