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.

A307851 Prime numbers prime(k) with a zeroless decimal representation such that (product of decimal digits of prime(k)) / k is an integer.

Original entry on oeis.org

2, 17, 73, 89, 2475989
Offset: 1

Views

Author

Ctibor O. Zizka, May 01 2019

Keywords

Examples

			For k = 21, prime(21) = 73, product of decimal digits of prime(k) / k = 7 * 3 / 21 = 1 so prime(21) = 73 is in the sequence.
		

Crossrefs

Programs

  • PARI
    lista(nn) = {my(ip=0, d); forprime(p=2, nn, ip++; d = digits(p); if (vecmin(d) && !(frac(vecprod(d)/ip)), print1(p, ", ")););} \\ Michel Marcus, May 02 2019
    
  • Python
    from math import prod
    from sympy import nextprime
    def aupton(terms):
      p, k, t = 2, 1, 0
      while t < terms:
        strp = str(p)
        if '0' not in strp and prod(int(d) for d in strp)%k == 0:
          t += 1; print(p, end=", ")
        p, k = nextprime(p), k+1
    aupton(5) # Michael S. Branicky, Feb 17 2021

Extensions

a(5) from Alois P. Heinz, May 01 2019