OFFSET
1,2
LINKS
Amiram Eldar, Table of n, a(n) for n = 1..10000
FORMULA
Sum_{n>=1} 1/a(n) = Product_{p in A006450} (1 + Sum_{q prime} 1/p^q) = 1.2271874... - Amiram Eldar, Jul 31 2021
EXAMPLE
675 = 3^3 * 5^2 = prime(prime(1))^prime(2) * prime(prime(2))^prime(1), therefore 675 is a term.
MATHEMATICA
Join[{1}, Select[Range[35000], AllTrue[Join[PrimePi[(t = Transpose @ FactorInteger[#])[[1]]], t[[2]]], PrimeQ] &]] (* Amiram Eldar, Jul 30 2021 *)
PROG
(Python)
from sympy import factorint, isprime, primepi
def ok(n):
f = factorint(n)
if not all(isprime(e) for e in f.values()): return False
return all(isprime(primepi(p)) for p in f)
print(list(filter(ok, range(35000)))) # Michael S. Branicky, Jul 30 2021
CROSSREFS
KEYWORD
nonn
AUTHOR
Ilya Gutkovskiy, Jul 30 2021
STATUS
approved