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.

A282585 Number of ways to write n as an ordered sum of 3 squarefree palindromes (A071251).

Original entry on oeis.org

0, 0, 0, 1, 3, 6, 7, 9, 12, 19, 21, 21, 18, 24, 27, 28, 18, 18, 19, 24, 15, 10, 6, 12, 12, 12, 9, 9, 12, 15, 18, 12, 9, 7, 15, 15, 15, 9, 12, 15, 18, 18, 12, 9, 9, 18, 15, 12, 0, 9, 9, 9, 0, 0, 0, 6, 6, 9, 12, 9, 12, 15, 18, 18, 12, 9, 13, 18, 18, 18, 9, 15, 18, 21, 18, 12, 9, 15, 21, 21, 21, 9, 18, 21, 24, 18
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 19 2017

Keywords

Comments

Every number can be written as the sum of 3 palindromes (see A261132 and A261422).
Conjecture: a(n) > 0 for any sufficiently large n.
Additional conjecture: every number > 3 can be written as the sum of 4 squarefree palindromes.

Examples

			a(22) = 6 because we have [11, 6, 5], [11, 5, 6] [6, 11, 5], [6, 5, 11], [5, 11, 6] and [5, 6, 11].
		

Crossrefs

Programs

  • Mathematica
    nmax = 85; CoefficientList[Series[Sum[Boole[SquareFreeQ[k] && PalindromeQ[k]] x^k, {k, 1, nmax}]^3, {x, 0, nmax}], x]

Formula

G.f.: (Sum_{k>=1} x^A071251(k))^3.

A035132 Nonsquarefree palindromes.

Original entry on oeis.org

4, 8, 9, 44, 88, 99, 121, 171, 212, 232, 242, 252, 272, 292, 333, 343, 363, 404, 414, 424, 444, 464, 484, 525, 575, 585, 616, 636, 656, 666, 676, 686, 696, 747, 808, 828, 848, 868, 888, 909, 999, 1331, 1881, 2112, 2332, 2552, 2662, 2772, 2992, 3663, 3773
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Examples

			4114 = 2 * 11^2 * 17.
		

Crossrefs

Intersection of A002113 and A013929.
Supersequence of A077572.
Cf. A005117, A035133, A071251, A075804 (first differences).

Programs

  • Mathematica
    sfQ[n_]:=Max[Transpose[FactorInteger[n]][[2]]]>1; palQ[n_]:=FromDigits[Reverse[IntegerDigits[n]]]==n; Select[Range[2,3776],sfQ[#] && palQ[#] &] (* Jayanta Basu, May 12 2013 *)
    Select[Range[4000], PalindromeQ[#] && !SquareFreeQ[#] &] (* Amiram Eldar, Feb 25 2021 *)
  • Python
    from itertools import product
    from sympy.ntheory.factor_ import core
    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 core(p, 2) != p
    print(list(filter(okpal, palsthru(4)))) # Michael S. Branicky, Apr 08 2021

A075803 Differences between adjacent palindromic squarefree numbers.

Original entry on oeis.org

1, 1, 2, 1, 1, 4, 11, 11, 22, 11, 11, 24, 10, 20, 10, 10, 10, 20, 10, 11, 20, 40, 20, 21, 10, 10, 30, 20, 10, 10, 41, 20, 20, 20, 11, 10, 20, 10, 10, 10, 30, 11, 20, 20, 61, 10, 10, 10, 20, 10, 10, 10, 10, 21, 20, 20, 20, 20, 21, 10, 10, 10, 10, 10, 10, 10, 12, 110, 110, 220
Offset: 1

Views

Author

Jani Melik, Oct 13 2002

Keywords

Examples

			a(1)=2-1=1, a(3)=5-3=2, a(6)=11-7=4.
		

Crossrefs

Cf. A037010.
First differences of A071251.

Programs

  • Maple
    test := proc(n) local d; d := convert(n,base,10); return ListTools[Reverse](d)=d and numtheory[mobius](n)<>0; end; s := []; for n from 1 to 1500 do if test(n) then s := [op(s),n]; end; od; a := [op(2..-1,s)-op(1..-2,s)];

Extensions

Edited by Dean Hickerson, Oct 21 2002
Showing 1-3 of 3 results.