cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A101987 Product of nonzero digits of n-th prime.

This page as a plain text file.
%I A101987 #20 Mar 11 2022 07:23:18
%S A101987 2,3,5,7,1,3,7,9,6,18,3,21,4,12,28,15,45,6,42,7,21,63,24,72,63,1,3,7,
%T A101987 9,3,14,3,21,27,36,5,35,18,42,21,63,8,9,27,63,81,2,12,28,36,18,54,8,
%U A101987 10,70,36,108,14,98,16,48,54,21,3,9,21,9,63,84,108,45,135,126,63,189,72,216
%N A101987 Product of nonzero digits of n-th prime.
%C A101987 First differs from A053666 in 26th term.
%F A101987 a(n) = A051801(prime(n)). - _Michel Marcus_, Mar 11 2022
%e A101987 a(25) = 63 because the 25th prime is 97 and 9 * 7 = 63.
%e A101987 a(26) = 1 because the 26th prime is 101, but we ignore the 0 and thus have 1 * 1 = 1.
%p A101987 a:= n-> mul(`if`(i=0, 1, i), i=convert(ithprime(n), base, 10)):
%p A101987 seq(a(n), n=1..77);  # _Alois P. Heinz_, Mar 11 2022
%t A101987 Table[Times@@ReplaceAll[IntegerDigits[Prime[n]], 0 -> 1], {n, 80}] (* _Alonso del Arte_, Feb 28 2014 *)
%o A101987 (PARI) a(n) = vecprod(select(x->(x>1), digits(prime(n)))); \\ _Michel Marcus_, Mar 11 2022
%o A101987 (Python)
%o A101987 from math import prod
%o A101987 from sympy import sieve
%o A101987 def A051801(n): return prod(int(d) for d in str(n) if d != '0')
%o A101987 def a(n): return A051801(sieve[n])
%o A101987 print([a(n) for n in range(1, 78)]) # _Michael S. Branicky_, Mar 11 2022
%Y A101987 Cf. A051801, A053666.
%Y A101987 Cf. A038618, A056709.
%K A101987 base,easy,nonn
%O A101987 1,1
%A A101987 _Zak Seidov_, Jan 29 2005