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.

A127482 Product of the nonzero digital products of all the prime numbers prime(1) to prime(n).

Original entry on oeis.org

2, 6, 30, 210, 210, 630, 4410, 39690, 238140, 4286520, 12859560, 270050760, 1080203040, 12962436480, 362948221440, 5444223321600, 244990049472000, 1469940296832000, 61737492466944000, 432162447268608000, 9075411392640768000, 571750917736368384000
Offset: 1

Views

Author

Alain Van Kerckhoven (alain(AT)avk.org), Sep 12 2007

Keywords

Examples

			a(7) = dp_10(2)*dp_10(3)*dp_10(5)*dp_10(7)*dp_10(11)*dp_10(13)*dp_10(17) = 2*3*5*7*(1*1)*(1*3)*(1*7) = 4410.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember; `if`(n<1, 1, a(n-1)*mul(
         `if`(i=0, 1, i), i=convert(ithprime(n), base, 10)))
        end:
    seq(a(n), n=1..30);  # Alois P. Heinz, Mar 11 2022
  • Mathematica
    Rest[FoldList[Times,1,Times@@Cases[IntegerDigits[#],Except[0]]&/@ Prime[ Range[ 20]]]] (* Harvey P. Dale, Mar 19 2013 *)
  • PARI
    f(n) = vecprod(select(x->(x>1), digits(prime(n)))); \\ A101987
    a(n) = prod(k=1, n, f(k)); \\ Michel Marcus, Mar 11 2022
    
  • Python
    from math import prod
    from sympy import sieve
    def pod(s): return prod(int(d) for d in s if d != '0')
    def a(n): return pod("".join(str(sieve[i+1]) for i in range(n)))
    print([a(n) for n in range(1, 23)]) # Michael S. Branicky, Mar 11 2022

Formula

a(n) = Product_{k=1..n} dp_p(prime(k)) where prime(k)=A000040(k) and dp_p(m)=product of the nonzero digits of m in base p (p=10 for this sequence). - Hieronymus Fischer, Sep 29 2007
From Michel Marcus, Mar 11 2022: (Start)
a(n) = Product_{k=1..n} A051801(prime(k)).
a(n) = Product_{k=1..n} A101987(k). (End)

Extensions

Corrected and extended by Hieronymus Fischer, Sep 29 2007