[go: up one dir, main page]

login

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 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A046349
Composite numbers with only palindromic prime factors.
4
4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 22, 24, 25, 27, 28, 30, 32, 33, 35, 36, 40, 42, 44, 45, 48, 49, 50, 54, 55, 56, 60, 63, 64, 66, 70, 72, 75, 77, 80, 81, 84, 88, 90, 96, 98, 99, 100, 105, 108, 110, 112, 120, 121, 125, 126, 128, 132, 135, 140, 144, 147, 150
OFFSET
1,1
LINKS
FORMULA
A033620 INTERSECT A002808. - R. J. Mathar, Sep 09 2015
MAPLE
isA046349 := proc(n)
simplify(isA033620(n) and not isprime(n)) ;
end proc:
for n from 2 to 300 do
if isA046349(n) then
printf("%d, ", n) ;
end if;
end do: # R. J. Mathar, Sep 09 2015
MATHEMATICA
palQ[n_]:=Reverse[x=IntegerDigits[n]]==x; Select[Range[4, 150], !PrimeQ[#]&&And@@palQ/@First/@FactorInteger[#]&] (* Jayanta Basu, Jun 05 2013 *)
Select[Range[200], CompositeQ[#]&&AllTrue[FactorInteger[#][[All, 1]], PalindromeQ]&] (* Harvey P. Dale, May 15 2022 *)
PROG
(Python)
from sympy import isprime, primefactors
def pal(n): s = str(n); return s == s[::-1]
def ok(n): return not isprime(n) and all(pal(f) for f in primefactors(n))
print(list(filter(ok, range(4, 151)))) # Michael S. Branicky, Apr 06 2021
CROSSREFS
KEYWORD
nonn,base,easy
AUTHOR
Patrick De Geest, Jun 15 1998
STATUS
approved