cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A046376 Palindromes with exactly 2 palindromic prime factors (counted with multiplicity), and no other prime factors.

This page as a plain text file.
%I A046376 #30 Aug 14 2022 15:29:34
%S A046376 4,6,9,22,33,55,77,121,202,262,303,393,505,626,707,939,1111,1441,1661,
%T A046376 1991,3443,3883,7997,10201,13231,15251,18281,19291,20602,22622,22822,
%U A046376 24842,26662,28682,30903,31613,33933,35653,37673,38683,39993,60206,60406,60806
%N A046376 Palindromes with exactly 2 palindromic prime factors (counted with multiplicity), and no other prime factors.
%C A046376 Equivalently, semiprime palindromes where both prime factors are palindromes. - _Franklin T. Adams-Watters_, Apr 11 2011
%C A046376 The sequence "trivially" includes products of palindromic primes p*q where
%C A046376   a) p = 2 or 3 and q has only digits < 4, as q = 11, 101, 131, 10301, 30103, ...
%C A046376   b) p <= 11 and q has only digits 0 and 1, as q = 101 and repunit primes A004022
%C A046376   c) p = 11 and q has only digits spaced out by zeros, as q = 101, 10301, 10501, 10601, 30103, 30203, 30403, 30703, 30803, ... - _M. F. Hasler_, Jan 04 2022
%H A046376 Lars Blomberg, <a href="/A046376/b046376.txt">Table of n, a(n) for n = 1..1000</a>
%F A046376 Intersection of A002113 and A046368; A188649(a(n)) = a(n). - _Reinhard Zumkeller_, Apr 11 2011
%e A046376 The palindrome 35653 is a term since it has 2 factors, 101 and 353, both palindromic.
%t A046376 Take[Select[Times@@@Tuples[Select[Prime[Range[5000]],PalindromeQ],2], PalindromeQ]// Union,50] (* _Harvey P. Dale_, Aug 25 2019 *)
%o A046376 (PARI) {first(N=50, p=1) = vector(N, i, until( bigomega( p=nxt_A002113(p))==2 && vecmin( apply( is_A002113, factor(p)[,1])),); p)} \\ _M. F. Hasler_, Jan 04 2022
%o A046376 (Python)
%o A046376 from sympy import factorint
%o A046376 from itertools import product
%o A046376 def ispal(n): s = str(n); return s == s[::-1]
%o A046376 def pals(d, base=10): # all d-digit palindromes
%o A046376     digits = "".join(str(i) for i in range(base))
%o A046376     for p in product(digits, repeat=d//2):
%o A046376         if d > 1 and p[0] == "0": continue
%o A046376         left = "".join(p); right = left[::-1]
%o A046376         for mid in [[""], digits][d%2]: yield int(left + mid + right)
%o A046376 def ok(pal):
%o A046376     f = factorint(pal)
%o A046376     return sum(f.values()) == 2 and all(ispal(p) for p in f)
%o A046376 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
%Y A046376 Cf. A001358 (semiprimes), A002113 (palindromes), A002385 (palindromic primes).
%Y A046376 Cf. A046328, A046408.
%Y A046376 Subsequence of A188650.
%K A046376 nonn,base
%O A046376 1,1
%A A046376 _Patrick De Geest_, Jun 15 1998
%E A046376 Definition clarified by _Franklin T. Adams-Watters_, Apr 11 2011
%E A046376 More terms from _Lars Blomberg_, Nov 06 2015