A180279 Triangle read by rows: AR(n,k) is the number of aperiodic k-reverses of n (n >= 1, 1 <= k <= n).
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
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.
Links
- Andrew Howroyd, Table of n, a(n) for n = 1..1275
Crossrefs
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
Comments