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.

Previous Showing 11-20 of 20 results.

A261918 Numbers which in base 5 are neither palindromes nor the sum of two palindromes.

Original entry on oeis.org

11, 17, 23, 51, 131, 141, 146, 147, 149, 151, 153, 154, 163, 164, 169, 173, 175, 177, 179, 181, 184, 185, 194, 195, 199, 200, 201, 203, 205, 206, 211, 215, 221, 225, 226, 229, 231, 236, 237, 241, 251, 259, 261, 262, 263, 266, 267, 271, 281, 287, 289, 291, 296, 297
Offset: 1

Views

Author

N. J. A. Sloane, Sep 13 2015

Keywords

Comments

The terms less than 20000, and conjecturally all terms, are the sum of three base 5 palindromes.

Crossrefs

Cf. A029952, A261917; A035137 (base 10 analog).

A115336 a(n) is the smallest number representable in exactly n ways as a sum of 2 palindromes (each of them >= 0).

Original entry on oeis.org

0, 2, 4, 6, 8, 110, 353, 363, 373, 383, 393, 464, 474, 504, 484, 494, 575, 605, 585, 1049, 595, 767, 706, 686, 777, 696, 807, 787, 878, 13222, 797, 908, 888, 31812, 12892, 898, 989, 11220, 44444, 1201, 999, 28882, 11110, 42623, 30092, 1100, 11000, 36153
Offset: 1

Views

Author

Giovanni Resta, Jan 20 2006

Keywords

Examples

			a(6)=110 since 110=101+9=99+11=88+22=77+33=66+44=55+55 and no
number less than 110 has 6 such decompositions.
		

Crossrefs

Programs

  • Mathematica
    palQ[n_] := n == FromDigits@Reverse@IntegerDigits@n; pt = Select[Range[0, 50005], palQ]; t = Array[0&, 50000]; Do[v = pt[[i]]+pt[[j]]; If[v<50000, t[[v + 1]]++ ], {i, 600}, {j, i}]; Table[Position[t, k][[1, 1]]-1, {k, 55}]

A262087 Largest palindrome p such that n-p is again a palindrome, or 0 if no such p exists.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 0, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 0, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 0, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 0, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 0, 66, 66, 66, 66, 66, 66, 66, 66, 66, 66, 0, 77, 77, 77, 77, 77, 77
Offset: 0

Views

Author

M. F. Hasler, Sep 10 2015

Keywords

Crossrefs

Programs

Formula

a(n) = 0 for n in {0} union A035137.

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.

A261909 A261908(n)/9.

Original entry on oeis.org

1, 10, 11, 20, 21, 30, 31, 40, 41, 50, 51, 60, 61, 70, 71, 80, 81, 90, 91, 100, 110, 111, 121, 131, 141, 151, 161, 171, 181, 191, 192, 200, 201, 212, 220, 231, 232, 252, 262, 272, 282, 292, 293, 300, 302, 312, 313, 321
Offset: 1

Views

Author

N. J. A. Sloane, Sep 09 2015

Keywords

Comments

Created in an attempt to understand A035137. It would be nice to have an independent definition of these numbers.

Crossrefs

A262528 Maximum number of backward steps k needed to find a representation of an n-digit decimal number x as a sum of three base-10 palindromes of the form k-th largest base-10 palindrome <= x plus a number representable as sum of two base-10 palindromes from A260255.

Original entry on oeis.org

0, 1, 1, 3, 3, 11, 4, 10, 4, 23, 9, 15, 6, 23, 11
Offset: 1

Views

Author

Hugo Pfoertner, Sep 26 2015

Keywords

Comments

The sequence terms are counterexamples to the second part of the claim stated in the answers to the Math Magic Problem of the Month (June 1999) that "all sufficiently large numbers seem to be the sum of 3 palindromes, one of which is the biggest or second biggest possible", which would mean all a(k)=2 for k "sufficiently large".
Since exhaustive search is currently (2015) considered as not feasible, a(16)>=16, a(17)>=7, a(18)>=25, a(19)>=14 are only lower bounds for the next sequence terms.
M. Sigg has shown that a(n)>=3 for n = 5 + 4 * j.

Examples

			a(1)=0 because all 1-digit numbers are palindromes,
a(2)=a(3)=1 because all 2-digit and all 3-digit numbers can be represented by the nearest smaller palindrome and a number <=10, e.g., 201=191+9+1.
a(4)=3, because for the number 2023 the largest palindrome leading to a difference representable as sum of two palindromes is 1881. 2023-2002=21 and 2023-1991=32 are not in A260255. 2023-1881=142=141+1 is in A260255. No other 4-digit number requires more than 3 backward steps.
a(6)=11 because for the 6-digit number 101199 none of the first 10 differences 101199-101101=98, 101199-10001=1198, 101199-99999=1200, 101199-99899=1300, 101199-99799=1400, 101199-99699=1500, 101199-99599=1600, 101199-99499=1700, 101199-99399=1800, 101199-99299=1900 is representable as sum of two palindromes (i.e., are in A035137), whereas the 11th palindrome 99199 leads to 101199-99199=2000=1991+9.
a(18)>=25 because for the number x=100000001814566071 only the 25th palindrome < x 99999997779999999 produces the first difference 4034566072 representable as sum of 2 palindromes.
		

Crossrefs

A263994 First element of first run of at least n consecutive numbers not representable as the sum of two base-10 palindromes.

Original entry on oeis.org

21, 1041, 1051, 1061, 1071, 1081, 1091, 107209, 108429, 109803, 10715097, 10854691, 10904639, 10904731, 10904731, 10904731, 10904731, 10983831, 11002311, 11002311, 11002311, 1078112970, 1078122970
Offset: 1

Views

Author

Hugo Pfoertner, Oct 31 2015

Keywords

Comments

First occurrence of n consecutive numbers in A035137.

Examples

			a(2)=1041 because 1041 and 1042 are the first two consecutive numbers in A035137.
		

Crossrefs

A287961 Numbers that are the sum of two palindromic primes (A002385).

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 10, 12, 13, 14, 16, 18, 22, 103, 104, 106, 108, 112, 133, 134, 136, 138, 142, 153, 154, 156, 158, 162, 183, 184, 186, 188, 192, 193, 194, 196, 198, 202, 232, 252, 262, 282, 292, 302, 312, 315, 316, 318, 320, 322, 324, 332, 342, 355, 356, 358, 360, 362, 364, 372, 375, 376, 378, 380
Offset: 1

Views

Author

Ilya Gutkovskiy, Jun 03 2017

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 380; f[x_] := Sum[Boole[PalindromeQ[k] && PrimeQ[k]] x^k, {k, 1, nmax}]^2; Exponent[#, x] & /@ List @@ Normal[Series[f[x], {x, 0, nmax}]]

A319387 Smallest palindrome p such that n-p is again a palindrome, or n if no such p exists.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 21, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 32, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 43, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 54, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 65, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 76, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 87, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 98, 0
Offset: 0

Views

Author

Markus Sigg, Sep 18 2018

Keywords

Comments

a(n) = n if and only if A262087(n) = 0.

Examples

			a(11) = 0 because 11 = 11 + 0, so 0 is the smallest palindrome in any partitioning of 11 as a sum of two palindromes.
a(21) = 21 because 21 cannot be written as a sum of two palindromes.
		

Crossrefs

Programs

  • Maple
    isP := k -> StringTools[IsPalindrome](convert(k,string)):
    a := NULL:
    for n from 0 to 99 do
       an := n:
       for k from 0 to n/2 do
          if isP(k) and isP(n-k) then an := min(an,k) end if
       end do:
       a := a,an
    end do:
    a;

A319586 Number of n-digit base-10 palindromes (A002113) that cannot be written as the sum of two positive base-10 palindromes.

Original entry on oeis.org

2, 0, 8, 7, 95, 94, 975, 971, 9810, 9805, 98288, 98272
Offset: 1

Views

Author

Hugo Pfoertner, Sep 23 2018

Keywords

Examples

			a(1) = 2, because 0 and 1 are not sums of two positive 1-digit integers, all of which are palindromes. a(3) = 8, because the 8 3-digit palindromes 111, 131, 141, 151, 161, 171, 181, and 191 (A213879(2) ... A213879(9)) cannot be written as sum of two nonzero palindromes.
		

Crossrefs

Programs

  • PARI
    \\ calculates a(2)...a(8) using M. F. Hasler's functions in A002113
    A002113(n)={my(L=logint(n,10));(n-=L=10^max(L-(n<11*10^(L-1)), 0))*L+fromdigits(Vecrev(digits(if(nA002113(n)={Vecrev(n=digits(n))==n}
    inv_A002113(P)={P\(P=10^(logint(P+!P, 10)\/2))+P}
    for(i=1,8,j=0;for(m=inv_A002113(10^i+1),inv_A002113(2*(10^i+1)),P=A002113(m);issum=0;for(k=2,m,PP=A002113(k);if(PP>P/2,break);if(is_A002113(P-PP),issum=1;break));if(issum==0,j++));print1(j,", ",))
    
  • Python
    from sympy import isprime
    from itertools import product
    def pals(d, base=10): # all d-digit palindromes
        digits = "".join(str(i) for i in range(base))
        for p in product(digits, repeat=d//2):
            if d > 1 and p[0] == "0": continue
            left = "".join(p); right = left[::-1]
            for mid in [[""], digits][d%2]: yield int(left + mid + right)
    def a(n):
        palslst = [p for d in range(1, n+1) for p in pals(d)][1:]
        palsset = set(palslst)
        cs = ctot = 0
        for p in pals(n):
            ctot += 1
            for p1 in palslst:
                if p - p1 in palsset: cs += 1; break
                if p1 > p//2: break
        return ctot - cs
    print([a(n) for n in range(1, 8)]) # Michael S. Branicky, Jul 12 2021

Extensions

a(12) from Giovanni Resta, Oct 01 2018
Previous Showing 11-20 of 20 results.