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

A226516 Number of (18,7)-reverse multiples with n digits.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 2, 3, 3, 4, 4, 6, 5, 8, 6, 10, 8, 13, 11, 17, 15, 23, 20, 31, 26, 41, 34, 54, 45, 71, 60, 94, 80, 125, 106, 166, 140, 220, 185, 291, 245, 385, 325, 510, 431, 676, 571, 896, 756, 1187, 1001, 1572, 1326, 2082, 1757, 2758, 2328, 3654, 3084, 4841, 4085, 6413
Offset: 0

Views

Author

N. J. A. Sloane, Jun 16 2013

Keywords

Comments

Comment from Emeric Deutsch, Aug 21 2016 (Start):
Given an increasing sequence of positive integers S = {a0, a1, a2, ... }, let
F(x) = x^{a0} + x^{a1} + x^{a2} + ... .
Then the g. f. for the number of palindromic compositions of n with parts in S is (see Hoggatt and Bicknell, Fibonacci Quarterly, 13(4), 1975):
(1 + F(x))/(1 - F(x^2))
Playing with this, I have found easily that
1. number of palindromic compositions of n into {3,4,5,...} = A226916(n+4);
2. number of palindromic compositions of n into {1,4,7,10,13,...} = A226916(n+6);
3. number of palindromic compositions of n into {1,4} = A226517(n+10);
4. number of palindromic compositions of n into {1,5} = A226516(n+11).
(End)

Crossrefs

Programs

  • Maple
    f:=proc(n) option remember;
    if
    n <= 5 then 0
    elif n=6 then 1
    elif n <= 10 then 0
    elif n <= 12 then 1
    else f(n-2)+f(n-10)
    fi;
    end;
    [seq(f(n),n=0..100)]
  • Mathematica
    CoefficientList[Series[x^6 (1 - x^2 + x^5 + x^6) / (1 - x^2 - x^10), {x, 0, 80}], x] (* Vincenzo Librandi, Jun 18 2013 *)
    LinearRecurrence[{0,1,0,0,0,0,0,0,0,1},{0,0,0,0,0,0,1,0,0,0,0,1,1},80] (* Harvey P. Dale, Jun 17 2015 *)

Formula

G.f.: x^6*(1+x)*(1-x+x^5)/(1-x^2-x^10).
a(n) = a(n-2) + a(n-10) for n>12, with initial values a(0)-a(12) equal to 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1. [Bruno Berselli, Jun 17 2013]
a(2n+1) = A003520(n-5). a(2n) = A098523(n-6). - R. J. Mathar, Dec 13 2022

A226517 Number of (19,14)-reverse multiples with n digits.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 2, 1, 2, 1, 3, 2, 4, 3, 6, 4, 8, 5, 11, 7, 15, 10, 21, 14, 29, 19, 40, 26, 55, 36, 76, 50, 105, 69, 145, 95, 200, 131, 276, 181, 381, 250, 526, 345, 726, 476, 1002, 657, 1383, 907, 1909, 1252, 2635, 1728, 3637, 2385, 5020, 3292, 6929, 4544, 9564, 6272, 13201, 8657, 18221
Offset: 0

Views

Author

N. J. A. Sloane, Jun 16 2013

Keywords

Comments

Comment from Emeric Deutsch, Aug 21 2016 (Start):
Given an increasing sequence of positive integers S = {a0, a1, a2, ... }, let
F(x) = x^{a0} + x^{a1} + x^{a2} + ... .
Then the g. f. for the number of palindromic compositions of n with parts in S is (see Hoggatt and Bicknell, Fibonacci Quarterly, 13(4), 1975, 350 - 356):
(1 + F(x))/(1 - F(x^2))
Playing with this, I have found easily that
1. number of palindromic compositions of n into {3,4,5,...} = A226916(n+4);
2. number of palindromic compositions of n into {1,4,7,10,13,...} = A226916(n+6);
3. number of palindromic compositions of n into {1,4} = A226517(n+10);
4. number of palindromic compositions of n into {1,5} = A226516(n+11).
(End)

Crossrefs

Programs

  • Maple
    f:=proc(n) option remember;
    if
    n <= 5 then 0
    elif n=6 then 1
    elif n <= 9 then 0
    elif n <= 11 then 1
    else f(n-2)+f(n-8)
    fi;
    end;
    [seq(f(n),n=0..120)];
  • Mathematica
    CoefficientList[Series[x^6 (1 - x^2 + x^4 + x^5) / (1 - x^2 - x^8), {x, 0, 80}], x] (* Vincenzo Librandi, Jun 18 2013 *)
    LinearRecurrence[{0,1,0,0,0,0,0,1},{0,0,0,0,0,0,1,0,0,0,1,1},80] (* Harvey P. Dale, Aug 23 2019 *)

Formula

G.f.: x^6*(1+x)*(1-x+x^4)/(1-x^2-x^8).
a(n) = a(n-2) + a(n-8) for n>11, with initial values a(0)-a(11) = 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1. [Bruno Berselli, Jun 17 2013]
a(2n+1)=A003269(n-4). a(2n)=A103632(n-3). - R. J. Mathar, Dec 13 2022

A276056 Triangle read by rows: T(n,k) is the number of compositions of n with parts in {1,3} and having asymmetry degree equal to k, (n>=0; 0<=k<=floor(n/4)).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 2, 2, 2, 4, 3, 6, 3, 6, 4, 5, 10, 4, 4, 12, 12, 7, 18, 16, 6, 22, 24, 8, 10, 34, 36, 8, 9, 36, 52, 32, 15, 58, 76, 40, 13, 60, 108, 80, 16, 22, 96, 160, 112, 16, 19, 100, 204, 192, 80, 32, 160, 312, 272, 96, 28, 162, 376, 440, 240, 32
Offset: 0

Views

Author

Emeric Deutsch, Aug 18 2016

Keywords

Comments

The asymmetry degree of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. Example: the asymmetry degree of (2,7,6,4,5,7,3) is 2, counting the pairs (2,3) and (6,5).
Number of entries in row n is 1 + floor(n/4).
Sum of entries in row n is A000930(n).

Examples

			Row 6 is [2,4] because the compositions of 6 with parts in {1,3} are 33, 3111, 1311, 1131, 1113, and 111111, having asymmetry degrees 0, 1, 1, 1, 1, and 0, respectively.
Triangle starts:
  1;
  1;
  1;
  2;
  1, 2;
  2, 2;
  2, 4;
  ...
		

References

  • S. Heubach and T. Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.

Crossrefs

Programs

  • Maple
    G := (1+z+z^3)/(1-z^2-2*t*z^4-z^6): Gser := simplify(series(G, z = 0, 30)): for n from 0 to 25 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 25 do seq(coeff(P[n], t, j), j = 0 .. degree(P[n])) end do; # yields sequence in triangular form
  • Mathematica
    Table[TakeWhile[BinCounts[#, {0, 1 + Floor[n/4], 1}], # != 0 &] &@ Map[Total, Map[Map[Boole[# >= 1] &, BitXor[Take[# - 1, Ceiling[Length[#]/2]], Reverse@ Take[# - 1, -Ceiling[Length[#]/2]]]] &, Flatten[Map[Permutations, DeleteCases[IntegerPartitions@ n, {_, a_, _} /; Nor[a == 1, a == 3]]], 1]]], {n, 0, 20}] // Flatten (* Michael De Vlieger, Aug 28 2016 *)

Formula

G.f.: G(t,z) = (1+z+z^3)/(1-z^2-2*t*z^4-z^6). In the more general situation of compositions into a[1]=1} z^(a[j]), we have G(t,z) = (1+F(z))/(1-F(z^2)-t*(F(z)^2-F(z^2))). In particular, for t=0 we obtain Theorem 1.2 of the Hoggatt et al. reference.
T(n,0) = A226916(n+7).
Sum_{k>=0} k*T(n,k) = A276057(n).

A276058 Triangle read by rows: T(n,k) is the number of compositions of n with parts in {3,4,5,6,...} and having asymmetry degree equal to k (n>=0; 0<=k<=floor(n/7)).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 4, 3, 6, 3, 10, 5, 14, 4, 24, 7, 30, 4, 6, 46, 8, 10, 58, 20, 9, 84, 36, 15, 106, 68, 13, 152, 112, 22, 188, 196, 19, 264, 304, 8, 32, 324, 492, 24, 28, 446, 732, 72, 47, 546, 1120, 160, 41, 744, 1616, 344
Offset: 0

Views

Author

Emeric Deutsch, Aug 22 2016

Keywords

Comments

The asymmetry degree of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. Example: the asymmetry degree of (2,7,6,4,5,7,3) is 2, counting the pairs (2,3) and (6,5).
A sequence is palindromic if and only if its asymmetry degree i 0.
Number of entries in row n is 1 + floor(n/7).
Sum of entries in row n is A078012(n).
T(n,0) = A226916(n+4)
Sum_{k>=0} k*T(n,k) = A276059(n).

Examples

			Row 7 is [1,2] because the compositions of 7 with parts in {3,4,5,...} are 7, 34, and 43, having asymmetry degrees 0, 1, and 1, respectively.
Triangle starts:
  1;
  0;
  0;
  1;
  1;
  1;
  2;
  1,2;
		

References

  • S. Heubach and T. Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.

Crossrefs

Programs

  • Maple
    G := (1-z^2)*(1-z+z^3)/(1-z-z^2+z^3-z^6+z^7-2*t*z^7): Gser := simplify(series(G, z = 0, 30)): for n from 0 to 25 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 25 do seq(coeff(P[n], t, j), j = 0 .. degree(P[n])) end do; # yields sequence in triangular form

Formula

G.f.: G(t,z) = (1-z^2)*(1-z+z^3)/(1-z-z^2+z^3-z^6+z^7-2*t*z^7). In the more general situation of compositions into a[1]=1} z^(a[j]), we have G(t,z) = (1 + F(z))/(1 - F(z^2) - t*(F(z)^2 - F(z^2))). In particular, for t=0 we obtain Theorem 1.2 of the Hoggatt et al. reference.

A276060 Triangle read by rows: T(n,k) is the number of compositions of n into parts congruent to 1 mod 3 and having asymmetry degree equal to k (n>=0; 0<=k<=floor(n/5)).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 2, 2, 2, 4, 3, 6, 3, 10, 5, 10, 4, 4, 20, 4, 7, 22, 12, 6, 34, 20, 10, 42, 36, 9, 64, 48, 8, 15, 70, 96, 8, 13, 112, 120, 32, 22, 124, 204, 56, 19, 184, 280, 112, 32, 212, 436, 176, 16, 28, 310, 564, 360, 16, 47, 346, 896, 504, 80, 41, 512, 1128, 920, 144, 69, 570, 1704, 1360
Offset: 0

Views

Author

Emeric Deutsch, Aug 22 2016

Keywords

Comments

The asymmetry degree of a finite sequence of numbers is defined to be the number of pairs of symmetrically positioned distinct entries. Example: the asymmetry degree of (2,7,6,4,5,7,3) is 2, counting the pairs (2,3) and (6,5).
Number of entries in row n is 1 + floor(n/5).
Sum of entries in row n is A000930(n-1).
T(n,0) = A226916(n+6) (n>=1).
Sum_{k>=0} k*T(n,k) = A276061(n).

Examples

			Row 7 is [2,4] because the compositions of 7 with parts in {1,4,7,10,...} are 7, 4111, 1411, 1141, 1114, and 1111111, having asymmetry degrees 0, 1, 1, 1, 1, and 0, respectively.
Triangle starts:
  1;
  1;
  1;
  1;
  2;
  1,2;
  2,2.
		

References

  • S. Heubach and T. Mansour, Combinatorics of Compositions and Words, CRC Press, 2010.

Crossrefs

Programs

  • Maple
    G := (1-z^2)*(1+z+z^2)*(1-z+z^2)*(1+z-z^3)/(1-z^2-z^3+z^5-2*t*z^5-z^6+z^9): Gser := simplify(series(G, z = 0, 30)): for n from 0 to 25 do P[n] := sort(coeff(Gser, z, n)) end do: for n from 0 to 25 do seq(coeff(P[n], t, j), j = 0 .. degree(P[n])) end do; # yields sequence in triangular form
  • Mathematica
    Table[TakeWhile[BinCounts[#, {0, 1 + Floor[n/5], 1}], # != 0 &] &@ Map[Total, Map[Map[Boole[# >= 1] &, BitXor[Take[# - 1, Ceiling[Length[#]/2]], Reverse@ Take[# - 1, -Ceiling[Length[#]/2]]]] &, Flatten[Map[Permutations, DeleteCases[IntegerPartitions@ n, {_, a_, _} /; Mod[a, 3] != 1]], 1]]], {n, 0, 24}] // Flatten (* Michael De Vlieger, Aug 22 2016 *)

Formula

G.f.: G(t,z) = (1-z^2)*(1+z+z^2)*(1-z+z^2)*(1+z-z^3)/(1-z^2-z^3+z^5-2*t*z^5-z^6+z^9). In the more general situation of compositions into a[1]=1} z^(a[j]), we have G(t,z) = (1 + F(z))/(1 - F(z^2) - t*(F(z)^2 - F(z^2))). In particular, for t=0 we obtain Theorem 1.2 of the Hoggatt et al. reference.

A317489 Irregular triangle read by rows. For n >= 3 and 1 <= k <= floor(n/3), T(n,k) is the number of palindromic compositions of n into k parts of size at least 3.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 2, 1, 1, 2, 1, 1, 0, 3, 0, 1, 1, 3, 2, 1, 0, 4, 0, 1, 1, 1, 4, 3, 1, 1, 0, 5, 0, 3, 1, 1, 5, 4, 3, 1, 1, 0, 6, 0, 6, 0, 1, 1, 6, 5, 6, 3, 1, 0, 7, 0, 10, 0, 1, 1, 1, 7, 6, 10, 6, 1, 1, 0, 8, 0, 15, 0, 4, 1, 1, 8, 7, 15, 10, 4, 1, 1, 0, 9, 0, 21, 0, 10, 0, 1, 1, 9, 8, 21, 15, 10, 4, 1, 0, 10, 0, 28, 0, 20, 0, 1, 1, 1, 10, 9, 28, 21, 20, 10, 1, 1, 0, 11, 0, 36, 0, 35, 0, 5
Offset: 3

Views

Author

Keywords

Examples

			For n=24 and k=3, T(24,3) = 8 = binomial((24-2)/2-3, (3-1)/2) = binomial(8,1).
The first entries of the irregular triangle formed by the values of T(n,k) are:
  1;
  1;
  1;
  1,  1;
  1,  0;
  1,  1;
  1,  0,  1;
  1,  1,  1;
  1,  0,  2;
  1,  1,  2,  1;
  1,  0,  3,  0;
  1,  1,  3,  2;
  1,  0,  4,  0,  1;
  1,  1,  4,  3,  1;
  1,  0,  5,  0,  3;
  1,  1,  5,  4,  3,  1;
  1,  0,  6,  0,  6,  0;
  1,  1,  6,  5,  6,  3;
  1,  0,  7,  0, 10,  0,  1;
  1,  1,  7,  6, 10,  6,  1;
  1,  0,  8,  0, 15,  0,  4;
  1,  1,  8,  7, 15, 10,  4,  1;
  1,  0,  9,  0, 21,  0, 10,  0;
  1,  1,  9,  8, 21, 15, 10,  4;
  1,  0, 10,  0, 28,  0, 20,  0,  1;
  1,  1, 10,  9, 28, 21, 20, 10,  1;
  1,  0, 11,  0, 36,  0, 35,  0,  5;
		

Crossrefs

Row sums of the triangle equal A226916(n+4).

Programs

  • Mathematica
    T[n_, k_] := If[Mod[n, 2] == 1 && Mod[k, 2] == 0, 0, Binomial[Quotient[n-1, 2] - k, Quotient[k-1, 2]]];
    Table[T[n, k], {n, 3, 30}, {k, 1, Quotient[n, 3]}] // Flatten (* Jean-François Alcover, Sep 13 2018, from PARI *)
  • PARI
    T(n,k)=if(n%2==1&&k%2==0, 0,  binomial((n-1)\2-k, (k-1)\2)); \\ Andrew Howroyd, Sep 07 2018

Formula

T(n,k) = 0 if n is odd and k is even;
T(n,k) = binomial((n-1)/2-k,(k-1)/2) if n is odd and k is odd;
T(n,k) = binomial((n-2)/2-k,(k-1)/2) if n is even and k is odd;
T(n,k) = binomial((n-2)/2-k,(k-2)/2) if n is even and k is even.
Showing 1-6 of 6 results.