OFFSET
1,1
COMMENTS
No further terms < 3600000. - Michael S. Branicky, Apr 25 2022
a(5) > 10^10, if it exists. - David A. Corneth, Apr 25 2022
EXAMPLE
Consider number 2: digsum(2) equal 2; 2*2 = 4; The number of primes not exceeding 4 is 2, the number itself. Thus, 2 is in this sequence.
Consider number 11: 11*digsum(11) = 22; PrimePi(22) = 8. Thus, 11 is not in this sequence.
MATHEMATICA
Select[Range[1000000], # == PrimePi[# Total[IntegerDigits[#]]] &]
PROG
(PARI) isok(k) = k==primepi(k*sumdigits(k)); \\ Michel Marcus, Apr 25 2022
(PARI) upto(n) = {q = 2; t = 0; res = List(); forprime(p = 3, n, t++; s = nextmultiple(q, t); forstep(i = s, p - 1, t, if(i % t == 0, c = i/t; if(sumdigits(t) == c, listput(res, t)); ) ); q = p; ); res }
nextmultiple(n, m) = my(d = ((n-m)%m)); n + !!d*m - d \\ David A. Corneth, Apr 25 2022
(Python)
from sympy import primepi, sieve
sieve.extend(12*10**6)
def sod(n): return sum(map(int, str(n)))
def afind(limit):
for k in range(1, limit+1):
if k == primepi(k*sod(k)):
print(k, end=", ")
afind(100363) # Michael S. Branicky, Apr 25 2022
CROSSREFS
KEYWORD
nonn,base,more
AUTHOR
Tanya Khovanova, Apr 24 2022
STATUS
approved