|
|
A307851
|
|
Prime numbers prime(k) with a zeroless decimal representation such that (product of decimal digits of prime(k)) / k is an integer.
|
|
0
|
|
|
|
OFFSET
|
1,1
|
|
LINKS
|
|
|
EXAMPLE
|
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.
|
|
PROG
|
(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
|
|
CROSSREFS
|
|
|
KEYWORD
|
base,nonn,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|