The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A046376 Palindromes with exactly 2 palindromic prime factors (counted with multiplicity), and no other prime factors. 6

%I #30 Aug 14 2022 15:29:34

%S 4,6,9,22,33,55,77,121,202,262,303,393,505,626,707,939,1111,1441,1661,

%T 1991,3443,3883,7997,10201,13231,15251,18281,19291,20602,22622,22822,

%U 24842,26662,28682,30903,31613,33933,35653,37673,38683,39993,60206,60406,60806

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

%C Equivalently, semiprime palindromes where both prime factors are palindromes. - _Franklin T. Adams-Watters_, Apr 11 2011

%C The sequence "trivially" includes products of palindromic primes p*q where

%C a) p = 2 or 3 and q has only digits < 4, as q = 11, 101, 131, 10301, 30103, ...

%C b) p <= 11 and q has only digits 0 and 1, as q = 101 and repunit primes A004022

%C 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 Lars Blomberg, <a href="/A046376/b046376.txt">Table of n, a(n) for n = 1..1000</a>

%F Intersection of A002113 and A046368; A188649(a(n)) = a(n). - _Reinhard Zumkeller_, Apr 11 2011

%e The palindrome 35653 is a term since it has 2 factors, 101 and 353, both palindromic.

%t Take[Select[Times@@@Tuples[Select[Prime[Range[5000]],PalindromeQ],2], PalindromeQ]// Union,50] (* _Harvey P. Dale_, Aug 25 2019 *)

%o (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 (Python)

%o from sympy import factorint

%o from itertools import product

%o def ispal(n): s = str(n); return s == s[::-1]

%o def pals(d, base=10): # all d-digit palindromes

%o digits = "".join(str(i) for i in range(base))

%o for p in product(digits, repeat=d//2):

%o if d > 1 and p[0] == "0": continue

%o left = "".join(p); right = left[::-1]

%o for mid in [[""], digits][d%2]: yield int(left + mid + right)

%o def ok(pal):

%o f = factorint(pal)

%o return sum(f.values()) == 2 and all(ispal(p) for p in f)

%o 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 Cf. A001358 (semiprimes), A002113 (palindromes), A002385 (palindromic primes).

%Y Cf. A046328, A046408.

%Y Subsequence of A188650.

%K nonn,base

%O 1,1

%A _Patrick De Geest_, Jun 15 1998

%E Definition clarified by _Franklin T. Adams-Watters_, Apr 11 2011

%E More terms from _Lars Blomberg_, Nov 06 2015

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 June 4 06:06 EDT 2024. Contains 373089 sequences. (Running on oeis4.)