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-7 of 7 results.

A261132 Number of ways to write n as the sum u+v+w of three palindromes (from A002113) with 0 <= u <= v <= w.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 8, 10, 12, 13, 15, 16, 17, 17, 18, 17, 17, 16, 15, 13, 12, 11, 10, 9, 8, 7, 7, 6, 6, 6, 6, 5, 7, 6, 6, 6, 6, 6, 6, 6, 6, 6, 5, 8, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 9, 7, 7, 7, 7, 7, 7, 7, 7, 7, 5, 11, 8, 8, 8, 8, 8, 8, 8, 8, 8, 5, 12, 8, 8, 8
Offset: 0

Views

Author

Giovanni Resta, Aug 10 2015

Keywords

Comments

It is known that a(n) > 0 for every n, i.e., every number can be written as the sum of 3 palindromes.
The graph has a kind of self-similarity: looking at the first 100 values, there is a Gaussian-shaped peak centered at the first local maximum a(15) = 18. Looking at the first 10000 values, one sees just one Gaussian-shaped peak centered around the record and local maximum a(1453) = 766, but to both sides of this value there are smaller peaks, roughly at distances which are multiples of 10. In the range [1..10^6], one sees a Gaussian-shaped peak centered around the record a(164445) = 57714. In the range [1..3*10^7], there is a similar peak of height ~ 4.3*10^6 at 1.65*10^7, with smaller neighbor peaks at distances which are multiples of 10^6, etc. - M. F. Hasler, Sep 09 2018

Examples

			a(0)=1 because 0 = 0+0+0;
a(1)=1 because 1 = 0+0+1;
a(2)=2 because 2 = 0+1+1 = 0+0+2;
a(3)=3 because 3 = 1+1+1 = 0+1+2 = 0+0+3.
a(28) = 6 since 28 can be expressed in 6 ways as the sum of 3 palindromes, namely, 28 = 0+6+22 = 1+5+22 = 2+4+22 = 3+3+22 = 6+11+11 = 8+9+11.
		

Crossrefs

See A261422 for another version.

Programs

  • Maple
    A261132 := proc(n)
        local xi,yi,x,y,z,a ;
        a := 0 ;
        for xi from 1 do
            x := A002113(xi) ;
            if 3*x > n then
                return a;
            end if;
            for yi from xi do
                y := A002113(yi) ;
                if x+2*y > n then
                    break;
                else
                    z := n-x-y ;
                    if z >= y and isA002113(z) then
                        a := a+1 ;
                    end if;
                end if;
            end do:
        end do:
        return a;
    end proc:
    seq(A261132(n),n=0..80) ; # R. J. Mathar, Sep 09 2015
  • Mathematica
    pal=Select[Range[0, 1000], (d = IntegerDigits@ #; d == Reverse@ d)&]; a[n_] := Length@ IntegerPartitions[n, {3}, pal]; a /@ Range[0, 1000]
  • PARI
    A261132(n)=n||return(1); my(c=0, i=inv_A002113(n)); A2113[i] > n && i--; until( A2113[i--]*3 < n, j = inv_A002113(D = n-A2113[i]); if( j>i, j=i, A2113[j] > D && j--); while( j >= k = inv_A002113(D - A2113[j]), A2113[k] == D - A2113[j] && c++; j--||break));c \\ For efficiency, this uses an array A2113 precomputed at least up to n. - M. F. Hasler, Sep 10 2018

Formula

a(n) = Sum_{k=0..3} A319453(n,k). - Alois P. Heinz, Sep 19 2018

Extensions

Examples revised and plots for large n added by Hugo Pfoertner, Aug 11 2015

A319453 Number T(n,k) of partitions of n into exactly k nonzero decimal palindromes; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 2, 1, 1, 0, 1, 2, 2, 1, 1, 0, 1, 3, 3, 2, 1, 1, 0, 1, 3, 4, 3, 2, 1, 1, 0, 1, 4, 5, 5, 3, 2, 1, 1, 0, 1, 4, 7, 6, 5, 3, 2, 1, 1, 0, 0, 5, 8, 9, 7, 5, 3, 2, 1, 1, 0, 1, 4, 10, 11, 10, 7, 5, 3, 2, 1, 1, 0, 0, 5, 11, 15, 13, 11, 7, 5, 3, 2, 1, 1
Offset: 0

Views

Author

Alois P. Heinz, Sep 19 2018

Keywords

Comments

Differs from A008284 and from A072233 first at T(10,1) = 0.

Examples

			Triangle T(n,k) begins:
  1;
  0, 1;
  0, 1, 1;
  0, 1, 1,  1;
  0, 1, 2,  1,  1;
  0, 1, 2,  2,  1,  1;
  0, 1, 3,  3,  2,  1,  1;
  0, 1, 3,  4,  3,  2,  1, 1;
  0, 1, 4,  5,  5,  3,  2, 1, 1;
  0, 1, 4,  7,  6,  5,  3, 2, 1, 1;
  0, 0, 5,  8,  9,  7,  5, 3, 2, 1, 1;
  0, 1, 4, 10, 11, 10,  7, 5, 3, 2, 1, 1;
  0, 0, 5, 11, 15, 13, 11, 7, 5, 3, 2, 1, 1;
  ...
		

Crossrefs

Columns k=0-10 give: A000007, A136522 (for n>0), A319468, A261131, A319469, A319470, A319471, A319472, A319473, A319474, A319475.
Row sums give A091580.
T(2n,n) gives A319454.

Programs

  • Maple
    p:= proc(n) option remember; local i, s; s:= ""||n;
          for i to iquo(length(s), 2) do if
            s[i]<>s[-i] then return false fi od; true
        end:
    h:= proc(n) option remember; `if`(n<1, 0,
         `if`(p(n), n, h(n-1)))
        end:
    b:= proc(n, i) option remember; `if`(n=0 or i=1, x^n,
          b(n, h(i-1))+expand(x*b(n-i, h(min(n-i, i)))))
        end:
    T:= n-> (p-> seq(coeff(p, x, i), i=0..n))(b(n, h(n))):
    seq(T(n), n=0..14);

Formula

T(n,k) = [x^n y^k] 1/Product_{j>=2} (1-y*x^A002113(j)).
Sum_{k=0..3} T(n,k) = A261132(n).

A341156 Number of partitions of n into 3 distinct nonzero decimal palindromes.

Original entry on oeis.org

1, 1, 2, 3, 4, 5, 7, 7, 9, 9, 10, 9, 10, 8, 8, 7, 6, 4, 4, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 4, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 4, 6, 6, 6, 6, 6, 6, 6, 6
Offset: 6

Views

Author

Ilya Gutkovskiy, Feb 06 2021

Keywords

Crossrefs

A341192 Number of ways to write n as an ordered sum of 3 nonzero decimal palindromes.

Original entry on oeis.org

1, 3, 6, 10, 15, 21, 28, 36, 45, 52, 60, 66, 70, 72, 72, 70, 66, 60, 55, 45, 39, 34, 30, 27, 25, 24, 24, 24, 27, 27, 25, 27, 27, 27, 27, 27, 27, 27, 27, 30, 27, 27, 30, 30, 30, 30, 30, 30, 30, 30, 33, 27, 30, 33, 33, 33, 33, 33, 33, 33, 33, 36, 27, 34, 36, 36, 36, 36
Offset: 3

Views

Author

Ilya Gutkovskiy, Feb 06 2021

Keywords

Crossrefs

Programs

  • Mathematica
    nmax = 70; CoefficientList[Series[Sum[Boole[PalindromeQ[k]] x^k, {k, 1, nmax}]^3, {x, 0, nmax}], x] // Drop[#, 3] &

A319477 Nonnegative integers which cannot be obtained by adding exactly two nonzero decimal palindromes.

Original entry on oeis.org

0, 1, 21, 32, 43, 54, 65, 76, 87, 98, 111, 131, 141, 151, 161, 171, 181, 191, 201, 1031, 1041, 1042, 1051, 1052, 1053, 1061, 1062, 1063, 1064, 1071, 1072, 1073, 1074, 1075, 1081, 1082, 1083, 1084, 1085, 1086, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1099
Offset: 1

Views

Author

Alois P. Heinz, Sep 19 2018

Keywords

Comments

Every integer larger than two can be obtained by adding exactly three nonzero decimal palindromes.
The nonzero palindromes of this sequence are in A213879.

Crossrefs

Cf. A002113, A035137 (allowing zero), A213879, A261131, A319453, A319468, A319586.

Programs

  • Maple
    p:= proc(n) option remember; local i, s; s:= ""||n;
          for i to iquo(length(s), 2) do if
            s[i]<>s[-i] then return false fi od; true
        end:
    h:= proc(n) option remember; `if`(n<1, 0,
         `if`(p(n), n, h(n-1)))
        end:
    b:= proc(n, i, t) option remember; `if`(n=0, 1, `if`(t*i (k-> b(n, h(n), k)-b(n, h(n), k-1))(2):
    a:= proc(n) option remember; local j; for j from 1+
          `if`(n=1, -1, a(n-1)) while g(j)<>0 do od; j
        end:
    seq(a(n), n=1..80);

Formula

A319468(a(n)) = 0.

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.

A282845 Number of ways to write n as an ordered sum of 6 prime power palindromes (A084092).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 6, 21, 56, 126, 246, 432, 702, 1077, 1576, 2232, 3072, 4112, 5352, 6801, 8422, 10197, 12102, 14117, 16146, 18177, 20112, 21882, 23382, 24661, 25566, 26136, 26316, 26181, 25560, 24677, 23436, 21981, 20226, 18486, 16536, 14642, 12702, 10962, 9166, 7662, 6222, 5042, 3912, 3096, 2306, 1746, 1236, 921, 600
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 22 2017

Keywords

Comments

Is there k which satisfies a(n) > 0 for all n > k?

Examples

			a(7) = 6 because we have:
[2, 1, 1, 1, 1, 1]
[1, 2, 1, 1, 1, 1]
[1, 1, 2, 1, 1, 1]
[1, 1, 1, 2, 1, 1]
[1, 1, 1, 1, 2, 1]
[1, 1, 1, 1, 1, 2]
		

Crossrefs

Programs

  • Mathematica
    nmax = 55; CoefficientList[Series[(x + Sum[Boole[PrimePowerQ[k] && PalindromeQ[k]] x^k, {k, 1, nmax}])^6, {x, 0, nmax}], x]

Formula

G.f.: (Sum_{k>=1} x^A084092(k))^6.
Showing 1-7 of 7 results.