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.

A046350 Odd composite numbers with only palindromic prime factors.

Original entry on oeis.org

9, 15, 21, 25, 27, 33, 35, 45, 49, 55, 63, 75, 77, 81, 99, 105, 121, 125, 135, 147, 165, 175, 189, 225, 231, 243, 245, 275, 297, 303, 315, 343, 363, 375, 385, 393, 405, 441, 453, 495, 505, 525, 539, 543, 567, 573, 605, 625, 655, 675, 693, 707, 729, 735, 755
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    palQ[n_]:=Reverse[x=IntegerDigits[n]]==x; Select[Range[9,755,2],!PrimeQ[#]&&And@@palQ/@First/@FactorInteger[#]&] (* Jayanta Basu, Jun 05 2013 *)
    Select[Range[9,800,2],CompositeQ[#]&&AllTrue[FactorInteger[#][[All,1]], PalindromeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Mar 08 2018 *)
  • 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(9, 756, 2)))) # Michael S. Branicky, Apr 06 2021