A383907 Echo primes: primes p such that the greatest prime factor of p-1 is a suffix of p.
Programs
-
Mathematica
Select[Prime@Range@3000,(f=FactorInteger[#-1][[-1,1]]; Mod[#,10^IntegerLength@f]==f)&]
-
Python
from sympy import factorint, isprime def ok(n): return n > 2 and isprime(n) and str(n).endswith(str(max(factorint(n-1)))) print([k for k in range(30000) if ok(k)]) # Michael S. Branicky, May 15 2025
Comments