login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A046408 Palindromes with exactly 2 distinct palindromic prime factors. 4
6, 22, 33, 55, 77, 202, 262, 303, 393, 505, 626, 707, 939, 1111, 1441, 1661, 1991, 3443, 3883, 7997, 13231, 15251, 18281, 19291, 20602, 22622, 22822, 24842, 26662, 28682, 30903, 31613, 33933, 35653, 37673, 38683, 39993, 60206, 60406, 60806, 62026, 64646, 64846 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
LINKS
MATHEMATICA
Select[Range[65000], PalindromeQ[#]&&Total[Boole[PalindromeQ/@ FactorInteger[ #][[All, 1]]]]==2&&PrimeOmega[#]==2&] (* Harvey P. Dale, Aug 07 2021 *)
PROG
(Python)
from sympy import factorint
from itertools import product
def ispal(n): s = str(n); return s == s[::-1]
def pals(d, base=10): # all d-digit palindromes
digits = "".join(str(i) for i in range(base))
for p in product(digits, repeat=d//2):
if d > 1 and p[0] == "0": continue
left = "".join(p); right = left[::-1]
for mid in [[""], digits][d%2]: yield int(left + mid + right)
def ok(pal):
f = factorint(pal)
return len(f) == 2 and sum(f.values()) == 2 and all(ispal(p) for p in f)
print(list(filter(ok, (p for d in range(1, 6) for p in pals(d) if ok(p))))) # Michael S. Branicky, Jun 22 2021
(PARI) ispal(n) = my(d=digits(n)); d == Vecrev(d) \\ A002113
for(k=1, 1e5, if(ispal(k)&&bigomega(k)==2, a=divisors(k); if(#a==4&&ispal(a[2])&&ispal(a[3]), print1(k, ", ")))) \\ Alexandru Petrescu, Aug 14 2022
CROSSREFS
Sequence in context: A035134 A075799 A046392 * A123017 A264043 A056821
KEYWORD
nonn,base
AUTHOR
Patrick De Geest, Jun 15 1998
EXTENSIONS
a(41) and beyond from Michael S. Branicky, Jun 22 2021
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 11:44 EDT 2024. Contains 371278 sequences. (Running on oeis4.)