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

 Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 60th year, we have over 367,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”). Other ways to Give
 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A046328 Palindromes with exactly 2 prime factors (counted with multiplicity). 14
 4, 6, 9, 22, 33, 55, 77, 111, 121, 141, 161, 202, 262, 303, 323, 393, 454, 505, 515, 535, 545, 565, 626, 707, 717, 737, 767, 818, 838, 878, 898, 939, 949, 959, 979, 989, 1111, 1441, 1661, 1991, 3113, 3223, 3443, 3883, 7117, 7447, 7997, 9119, 9229, 9449, 10001 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,1 LINKS Giovanni Resta, Table of n, a(n) for n = 1..10000 (first 2000 terms from Zak Seidov, terms a(2001)-a(2816) from Michael De Vlieger) EXAMPLE 111 is a palindrome and 111 = 3*37. 3 and 37 are primes. MATHEMATICA fQ[n_] := Block[{id = IntegerDigits[n]}, Plus @@ Last /@ FactorInteger[n] == 2 && id == Reverse[id]]; Select[ Range[ 10000], fQ[ # ] &] (* Robert G. Wilson v, Jun 06 2005 *) Select[Range[10002], Reverse[x = IntegerDigits[#]] == x && PrimeOmega[#] == 2 &] (* Jayanta Basu, Jun 23 2013 *) Select[Range[11000], PalindromeQ[#]&&PrimeOmega[#]==2&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 30 2018 *) PROG (PARI) ispal(n) = my(d=digits(n)); d == Vecrev(d) \\ A002113 for(k=1, 1e4, if(ispal(k)&&bigomega(k)==2, print1(k, ", "))) \\ Alexandru Petrescu, Jul 07 2022 (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): return sum(factorint(pal).values()) == 2 print(list(filter(ok, (p for d in range(1, 6) for p in pals(d) if ok(p))))) # Michael S. Branicky, Aug 14 2022 CROSSREFS Cf. A046315, A046408, A108505. Subsequence of A001358 and A046338. Sequence in context: A046338 A118690 A084994 * A196104 A046376 A229129 Adjacent sequences: A046325 A046326 A046327 * A046329 A046330 A046331 KEYWORD nonn,base AUTHOR Patrick De Geest, Jun 15 1998 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.

Last modified December 7 11:26 EST 2023. Contains 367650 sequences. (Running on oeis4.)