OFFSET
1,1
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..1000
EXAMPLE
a(25) = 63 because the 25th prime is 97, and 9 * 7 = 63.
a(26) = 0 because the 26th prime is 101, and 1 * 0 * 1 = 0.
MAPLE
a:= n-> mul(i, i=convert(ithprime(n), base, 10)):
seq(a(n), n=1..78); # Alois P. Heinz, Mar 11 2022
MATHEMATICA
Table[Times@@IntegerDigits[Prime[n]], {n, 80}] (* Alonso del Arte, Feb 28 2014 *)
PROG
(PARI) a(n) = {d = digits(prime(n), 10); return (prod(i=1, #d, d[i])); } \\ Michel Marcus, Jun 12 2013
(Magma) [&*Intseq(NthPrime(n)): n in [1..80]]; // Vincenzo Librandi, Sep 15 2014
(Python)
from math import prod
from sympy import sieve
def pod(n): return prod(map(int, str(n)))
def a(n): return pod(sieve[n])
print([a(n) for n in range(1, 79)]) # Michael S. Branicky, Mar 11 2022
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Enoch Haga, Feb 16 2000
STATUS
approved