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.

Showing 1-3 of 3 results.

A046351 Palindromic composite numbers with only palindromic prime factors.

Original entry on oeis.org

4, 6, 8, 9, 22, 33, 44, 55, 66, 77, 88, 99, 121, 202, 242, 252, 262, 303, 343, 363, 393, 404, 484, 505, 525, 606, 616, 626, 686, 707, 808, 909, 939, 1111, 1331, 1441, 1661, 1991, 2112, 2222, 2662, 2772, 2882, 3333, 3443, 3773, 3883, 3993, 4224, 4444, 5445
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    palQ[n_]:=Reverse[x=IntegerDigits[n]]==x; Select[Range[4,5500],!PrimeQ[#]&&And@@palQ/@Join[{#},First/@FactorInteger[#]]&](* Jayanta Basu, Jun 05 2013 *)
  • Python
    from itertools import product
    from sympy import isprime, primefactors as pf
    def pal(n): s = str(n); return s == s[::-1]
    def palsthru(maxdigits):
      midrange = [[""], [str(i) for i in range(10)]]
      for digits in range(1, maxdigits+1):
        for p in product("0123456789", repeat=digits//2):
          left = "".join(p)
          if len(left) and left[0] == '0': continue
          for middle in midrange[digits%2]: yield int(left+middle+left[::-1])
    def okpal(p): return p > 3 and not isprime(p) and all(pal(f) for f in pf(p))
    print(list(filter(okpal, palsthru(4)))) # Michael S. Branicky, Apr 06 2021

Formula

(A032350 INTERSECT A033620) MINUS {1}. - R. J. Mathar, Sep 09 2015

A046355 Composite numbers with only palindromic prime factors whose sum is palindromic (counted with multiplicity).

Original entry on oeis.org

4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20, 24, 27, 28, 40, 45, 48, 54, 121, 308, 440, 495, 528, 594, 735, 784, 875, 882, 1050, 1120, 1250, 1260, 1331, 1344, 1500, 1512, 1600, 1701, 1800, 1920, 2025, 2048, 2101, 2121, 2160, 2304, 2430, 2525, 2592, 2751, 2916, 3030
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1998

Keywords

Comments

Subsequence of the numbers k in A046349 such that A262049(k) is in A002113. - R. J. Mathar, Sep 09 2015

Examples

			3030 = 2 * 3 * 5 * 101 -> 2 + 3 + 5 + 101 = 111 and 111 is a palindrome.
		

Crossrefs

Programs

  • Maple
    isA046355 := proc(n)
        local sofpp ;
        if isA046349(n) then
            sofpp := A262049(n) ;
            isA002113(sofpp) ;
        else
            false;
        end if;
    end proc:
    for n from 2 to 400 do
        if isA046355(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,3100], !PrimeQ[#] && And@@palQ/@Join[{Total[Times@@@(x=FactorInteger[#])]}, First/@x]&] (* Jayanta Basu, Jun 05 2013 *)

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
Showing 1-3 of 3 results.