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.

A119963 Triangle T(n,k), 0 <= k <= n, read by rows, with T(2n,2k) = T(2n+1,2k) = T(2n+1,2k+1) = T(2n+2,2k+1) = binomial(n,k).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 3, 2, 3, 1, 1, 1, 1, 3, 3, 3, 3, 1, 1, 1, 1, 4, 3, 6, 3, 4, 1, 1, 1, 1, 4, 4, 6, 6, 4, 4, 1, 1, 1, 1, 5, 4, 10, 6, 10, 4, 5, 1, 1, 1, 1, 5, 5, 10, 10, 10, 10, 5, 5, 1, 1, 1, 1, 6, 5, 15, 10, 20, 10, 15, 5, 6, 1, 1, 1, 1, 6, 6, 15, 15, 20, 20, 15, 15, 6, 6, 1, 1, 1, 1, 7, 6, 21, 15, 35, 20, 35, 15, 21, 6, 7, 1, 1
Offset: 0

Views

Author

Philippe Deléham, Aug 02 2006

Keywords

Comments

From John P. McSorley, Aug 24 2010: (Start)
A combinatorial interpretation of this triangle is as follows:
Ignore the first column of 1's of the above triangle and the call the (n,k) entry of the new triangle formed RE(n,k).
Hence row 8 of the 'RE(n,k)' triangle is 1 4 3 6 3 4 1 1.
Now see sequence A180171 for the definition of a k-reverse of n.
Briefly, a k-reverse of n is a k-composition of n which is cyclically equivalent to its reverse.
Sequence A180171 is the 'R(n,k)' triangle read by rows where R(n,k) is the total number of k-reverses of n.
Then RE(n,k) is the number of k-reverses of n up to cyclic equivalence.
In sequence A180171 we have R(8,3)=9 because there are 9 3-reverses of 8.
In cyclically equivalent classes: {116,611,161} {224,422,242}, and {233,323,332}; since there are 3 such classes we have RE(8,3)=3.
Similarly, in A180171, we have R(8,6)=21 because all 21 6-compositions of 8 are 6-reverses of 8, but they come in 4 cyclically equivalent classes (with representatives 111113, 111122, 111212, and 112112) hence RE(8,6)=4.
There is another (equivalent) interpretation for RE(n,k) involving k-subsets of Z_n, the integers modulo n, and the multiplier -1. See the McSorley/Schoen paper below for more details.
In this case it is convenient to count k-subsets up to dihedral equivalence, rather than cyclic equivalence.
The counts are the same. The row sums of the 'RE(n,k)' triangle give sequence A052955.
(End)
From Petros Hadjicostas, Oct 12 2017: (Start)
When 1 <= k <= n, each cyclically equivalence class of k-reverses of n is a "Sommerville symmetrical cyclic composition," which was introduced by Sommerville (1909). On pp. 301-304 of his paper, he proves that the number of such (equivalence classes of) compositions of n with length k is exactly T(n,k) = RE(n,k).
The equivalence class of a Sommerville symmetrical cyclic composition contains at least one palindromic composition (type I) or a composition that becomes a palindromic composition if we remove the first part (type II). A composition with only one part is a palindromic composition of both types. Hadjicostas and Zhang (2017) have proved that each equivalence class of k-reverses of n contains exactly two compositions that are either of type I or type II (except in the case when k | n and all the parts are the same).
For example, consider the case with n=8 and k=3, where RE(8,3)=3. As pointed above by J. P. McSorley, in cyclically equivalent classes we have {116,611,161} {224,422,242}, and {233,323,332}. The first class contains one composition of type I (161) and one of type II (611); the second class contains one composition of type I (242) and one of type II (422); and the last class contains one composition of type I (323) and one of type II (233).
When n = 6 and k = 4, the class of 4-reverses {1221, 2211, 2112, 1122} contains two compositions of type I (1221 and 2112).
If A is a set of positive integers and 1 <= k <= n, let RE_A(n,k) be the total number of Sommerville symmetrical cyclic compositions of n with length k and parts only in A (= number of cyclically equivalence classes of k-reverses of n with parts only in A). Then the g.f. of RE_A(n,k) is Sum_{n,k >= 1} RE_A(n,k) * x^n * y^k = (-1/2) + (1 + y * f_A(x))^2/(2 * (1 - y^2 * f_A(x^2)), where f_A(x) = Sum_{m in A} x^m. (For this sequence, A = all positive integers.)
Sequence A292200 contains the total number of Sommerville symmetrical cyclic compositions of n that are Carlitz (compositions that have length one, or have length >= 1 and adjacent parts of the composition on a circle are distinct).
(End)

Examples

			Triangle begins (with rows for n >= 0 and columns for k >= 0) as follows:
  1;
  1, 1;
  1, 1, 1;
  1, 1, 1, 1;
  1, 1, 2, 1, 1;
  1, 1, 2, 2, 1, 1;
  1, 1, 3, 2, 3, 1, 1;
  1, 1, 3, 3, 3, 3, 1, 1;
  1, 1, 4, 3, 6, 3, 4, 1, 1;
  1, 1, 4, 4, 6, 6, 4, 4, 1, 1;
  ...
		

References

  • John P. McSorley, Counting k-compositions of n with palindromic and related structures, preprint, 2010. [From John P. McSorley, Aug 24 2010]

Crossrefs

The row sums of the T(n,k) triangle give sequence A029744 whose terms are 1 more than the terms of sequence A052955 (row sums of RE(n,k) triangle). See sequence A029744 where there is a reference to necklaces relevant to the combinatorial interpretation and the McSorley and McSorley/Schoen papers given here. - John P. McSorley, Aug 31 2010

Programs

  • Mathematica
    Table[Binomial[Floor[(n - Boole[OddQ@ k])/2], Floor[k/2]], {n, 0, 10}, {k, 0, n}] (* Michael De Vlieger, Oct 11 2017, after PARI by Andrew Howroyd *)
  • PARI
    T(n,k) = binomial((n-k%2)\2, k\2); \\ Andrew Howroyd, Oct 08 2017

Formula

G.f.: Sum_{n,k >= 1} RE(n,k)*x^n*y^k = (1+x*y-x^2)*x*y/((1-x)*(1-x^2-x^2*y^2)). - Petros Hadjicostas, Oct 12 2017
G.f.: Sum_{n,k >= 0} T(n,k)*x^n*y^k = (1+x*y)*(1+x)/(1-x^2-x^2*y^2) as above, but adding 1/(1-x) to include n,k = 0 terms. - Paul Sampson, Nov 22 2017
T(n, k) = binomial(floor(n/2) - (k mod 2) * (1 - (n mod 2)), floor(k/2)) for 0 <= k <= n. - Petros Hadjicostas, May 29 2019

Extensions

Corrected by Philippe Deléham, Aug 20 2010

A180279 Triangle read by rows: AR(n,k) is the number of aperiodic k-reverses of n (n >= 1, 1 <= k <= n).

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 2, 3, 0, 1, 4, 6, 4, 0, 1, 4, 3, 8, 5, 0, 1, 6, 9, 12, 15, 6, 0, 1, 6, 9, 16, 15, 18, 7, 0, 1, 8, 9, 24, 30, 18, 28, 8, 0, 1, 8, 12, 32, 25, 48, 28, 32, 9, 0, 1, 10, 15, 40, 50, 60, 70, 40, 45, 10, 0, 1, 10, 12, 48, 50, 102, 70, 96, 36, 50, 11, 0
Offset: 1

Views

Author

John P. McSorley, Aug 23 2010

Keywords

Comments

A k-composition of n is an ordered collection of k positive integers (parts) which sum to n.
A k-composition is aperiodic (primitive) if its period is k, or if it is not the concatenation of at least two smaller [identical] compositions.
Two k-compositions are cyclically equivalent if one can be obtained from the other by a cyclic permutation of its parts.
The reverse of a k-composition is the k-composition obtained by writing its parts in reverse. For example the reverse of 123 is 321.
A k-reverse of n is a k-composition of n which is cyclically equivalent to its reverse. And an aperiodic k-reverse of n is a k-reverse of n which is aperiodic.
For example, 114 is an aperiodic 3-reverse of 6 since it is aperiodic and its set of cyclic equivalents {114, 411, 141} contains its reverse 411.
But 123 is not an aperiodic 3-reverse of 6 since, even though it is aperiodic, its set of cyclic equivalents {123, 312, 231} does not contain its reverse 321.
Let AR(n,k) denote the number of aperiodic k-reverses of n.
This sequence is the 'AR(n,k)' triangle read by rows.

Examples

			Triangle AR(n,k) (with n >= 1 and 1 <= k <= n) begins as follows:
  1
  1 0
  1 2  0
  1 2  3  0
  1 4  6  4  0
  1 4  3  8  5  0
  1 6  9 12 15  6  0
  1 6  9 16 15 18  7  0
  1 8  9 24 30 18 28  8 0
  1 8 12 32 25 48 28 32 9 0
  ...
For example, row 8 is 1 6 9 16 15 18 7 0.
We have AR(8,3) = 9 because there are 9 aperiodic 3-reverses of 8.
These are in the classes {116, 611, 161}, {224, 422, 242}, and {233, 323, 332}.
We have AR(8,6) = 18 because all, except 3, of the 21 6-compositions of 8 are aperiodic 6-reverses of 8. The missing 3 form one class, {112112, 211211, 121121}, and they are each 6-reverses of 8, but they are each periodic of period 3; so, they are not aperiodic. [Edited by _Petros Hadjicostas_, Apr 27 2020]
		

References

  • John P. McSorley: Counting k-compositions of n with palindromic and related structures. Preprint, 2010.

Crossrefs

If we ignore the aperiodic requirement, we get the sequence A180171.
Row sums are A180322.
Cf. A119963.

Programs

  • Mathematica
    Table[k DivisorSum[GCD[n, k], MoebiusMu[#] Apply[Binomial[Floor[(#1 - Boole[OddQ@ #2])/2], Floor[#2/2]] &, {n/#, k/#}] &], {n, 12}, {k, n}] // Flatten (* Michael De Vlieger, Oct 11 2017 *)
  • PARI
    \\ here p(n,k) is A119963.
    p(n,k) = binomial((n-k%2)\2, k\2);
    T(n, k) = k*sumdiv(gcd(n,k), d, moebius(d) * p(n/d, k/d));
    for(n=1, 10, for(k=1, n, print1(T(n,k), ", ")); print) \\ Andrew Howroyd, Oct 08 2017

Formula

AR(n, k) = k * Sum_{d|gcd(n,k)} mu(d) * A119963(n/d, k/d). - Andrew Howroyd, Oct 08 2017 (Corrected by Petros Hadjicostas, Oct 11 2017.)

Extensions

Terms a(56) and beyond from Andrew Howroyd, Oct 08 2017
Name edited by Petros Hadjicostas, Apr 28 2020

A180249 a(n) is the total number of k-reverses of n.

Original entry on oeis.org

1, 2, 4, 8, 16, 26, 50, 80, 130, 212, 342, 518, 820, 1276, 1864, 2960, 4336, 6704, 9710, 15068, 21368, 33420, 47082, 72950, 102316, 158888, 220882, 342616, 475108, 734816, 1015778, 1569680, 2161944, 3337952, 4587200, 7069748, 9699292, 14932444, 20445520
Offset: 1

Views

Author

John P. McSorley, Aug 19 2010

Keywords

Comments

See sequence A180171 for the definition of a k-reverse of n.
Briefly, a k-reverse of n is a k-composition of n whose reverse is cyclically equivalent to itself.
This sequence is the total number of k-reverses of n for k=1,2,...,n.
It is the row sums of the 'R(n,k)' triangle from sequence A180171.
For example a(6)=26 because there are 26 k-reverses of n=6 for k=1,2,3,4,5, or 6.
They are, in cyclically equivalent, classes: {6}, {15,51}, {24,42},{33},{114,411,141},{222} {1113,3111,1311,1131}, {1122,2112,2211,1221}, {1212,2121}, {11112,21111,12111,11211,11121}, {111111}.

References

  • John P. McSorley: Counting k-compositions with palindromic and related structures. Preprint, 2010.

Crossrefs

If we ask for the number of cyclically equivalent classes we get sequence A052955.
For example the 6th term of A052955 is 11, corresponding to the 11 classes in the example above.
Row sums of A180171.

Programs

  • Mathematica
    f[n_Integer] := Block[{c = 0, k = 1, ip = IntegerPartitions@ n, lmt = 1 + PartitionsP@ n, ipk}, While[k < lmt, c += g[ ip[[k]]]; k++ ]; c]; g[lst_List] := Block[{c = 0, len = Length@ lst, per = Permutations@ lst}, While[ Length@ per > 0, rl = Union[ RotateLeft[ per[[1]], # ] & /@ Range@ len]; If[ MemberQ[rl, Reverse@ per[[1]]], c += Length@ rl]; per = Complement[ per, rl]]; c]; Array[f, 24] (* Robert G. Wilson v, Aug 25 2010 *)
    b[n_] := Sum[MoebiusMu[n/d] * If[OddQ[d], 2, 3] * 2^Quotient[d-1, 2], {d, Divisors[n]}]; a[n_] := Sum[d*b[d], {d, Divisors[n]}] / 2; Array[a, 39] (* Jean-François Alcover, Nov 04 2017, after Andrew Howroyd *)
  • PARI
    \\ here b(n) is A056493
    b(n) = sumdiv(n, d, moebius(n/d) * if(d%2,2,3) * 2^((d-1)\2));
    a(n) = sumdiv(n, d, d*b(d)) / 2; \\ Andrew Howroyd, Oct 07 2017

Formula

a(n) = Sum_{d|n} d*A056493(d)/2. - Andrew Howroyd, Oct 07 2017
From Petros Hadjicostas, Oct 15 2017: (Start)
a(n) = (n/2)*Sum_{d|n} (phi^(-1)(d)/d)*b(n/d), where phi^(-1)(n) = A023900(n) is the Dirichlet inverse of the Euler totient function and b(n) = A029744(n+1) (= 3*2^((n/2)-1), if n is even, and = 2^((n+1)/2), if n is odd).
G.f.: Sum_{n>=1} phi^(-1)(n)*g(x^n), where phi^(-1)(n) = A023900(n) and g(x) = x*(x+1)*(2*x+1)/(1-2*x^2)^2.
(End)

Extensions

a(11) - a(24) from Robert G. Wilson v, Aug 25 2010
a(25) - a(27) from Robert G. Wilson v, Aug 29 2010
Terms a(28) and beyond from Andrew Howroyd, Oct 07 2017
Showing 1-3 of 3 results.