login
A072299
Numbers k such that reverse(k) is a prime factor of k.
1
2, 3, 5, 7, 11, 20, 30, 50, 70, 101, 110, 131, 151, 181, 191, 200, 300, 313, 353, 373, 383, 500, 700, 727, 757, 787, 797, 919, 929, 1010, 1100, 1310, 1510, 1810, 1910, 2000, 3000, 3130, 3530, 3730, 3830, 5000, 7000, 7270, 7570, 7870, 7970, 9190, 9290
OFFSET
1,1
COMMENTS
All palindromic primes are terms of this sequence. - Harvey P. Dale, Jun 30 2022
Other than 2*10^i and 5*10^i, for i >= 0, all terms must begin with 1, 3, 7, or 9. - Michael S. Branicky, Sep 23 2024
LINKS
Michael S. Branicky, Table of n, a(n) for n = 1..10000 (terms 1..700 from Harvey P. Dale)
EXAMPLE
Reverse(110) = 11 is a prime factor of 110, so 110 is a term of the sequence.
MATHEMATICA
r = {}; Do[m = FromDigits[Reverse[IntegerDigits[n]]]; If[PrimeQ[m] && Mod[n, m] == 0, r = Append[r, n]], {n, 1, 10^4}]; r
Select[Range[2, 10000], MemberQ[FactorInteger[#][[All, 1]], IntegerReverse[#]]&] (* Harvey P. Dale, Jun 30 2022 *)
PROG
(Python)
from sympy import isprime
def ok(n): return (r:=int(str(n)[::-1])) <= n and n%r == 0 and isprime(r)
print([k for k in range(1, 10**4) if ok(k)]) # Michael S. Branicky, Sep 23 2024
(Python) # uses ok, import above
from itertools import count, islice
def agen(): # generator of terms
for e in count(1):
for f in [1, 2, 3, 5, 7, 9]:
base = f*10**(e-1)
if f in {2, 5}: yield base; continue
for k in range(base, base+10**(e-1)):
if ok(k): yield k
print(list(islice(agen(), 50))) # Michael S. Branicky, Sep 23 2024
CROSSREFS
Sequence in context: A373045 A079429 A262378 * A334199 A297026 A038204
KEYWORD
base,nonn
AUTHOR
Joseph L. Pe, Jul 14 2002
EXTENSIONS
Offset corrected by Sean A. Irvine, Sep 22 2024
STATUS
approved