A179781
a(n) = AP(n) is the total number of aperiodic k-palindromes of n, 1 <= k <= n.
Original entry on oeis.org
1, 1, 1, 2, 3, 5, 7, 12, 14, 27, 31, 54, 63, 119, 123, 240, 255, 490, 511, 990, 1015, 2015, 2047, 4020, 4092, 8127, 8176, 16254, 16383, 32607, 32767, 65280, 65503, 130815, 131061, 261576, 262143, 523775, 524223, 1047540, 1048575, 2096003, 2097151, 4192254
Offset: 1
For a(7)=7, the achiral set partitions are 0000001, 0000011, 0000101, 0000111, 0001001, 0010011, and 0010101. - _Robert A. Russell_, Jun 19 2019
- John P. McSorley, Counting k-compositions of n with palindromic and related structures. Preprint, 2010.
-
a[n_] := DivisorSum[n, MoebiusMu[n/#] * 2^Floor[#/2]&];
Array[a, 44] (* Jean-François Alcover, Nov 04 2017 *)
-
a(n) = sumdiv(n, d, moebius(n/d) * 2^(d\2)); \\ Michel Marcus, Dec 09 2014
A180653
'DP(n,k)' triangle read by rows. DP(n,k) is the number of k-double-palindromes of n.
Original entry on oeis.org
0, 0, 1, 0, 2, 1, 0, 3, 2, 1, 0, 4, 4, 4, 1, 0, 5, 3, 8, 4, 1, 0, 6, 6, 12, 12, 6, 1, 0, 7, 6, 17, 12, 19, 6, 1, 0, 8, 7, 24, 24, 20, 24, 8, 1, 0, 9, 8, 32, 21, 50, 24, 32, 8, 1, 0, 10, 10, 40, 40, 60, 60, 40, 40, 10, 1, 0, 11, 9, 49, 40, 100, 60, 98, 35, 51, 10, 1
Offset: 1
The triangle begins
0
0 1
0 2 1
0 3 2 1
0 4 4 4 1
0 5 3 8 4 1
0 6 6 12 12 6 1
0 7 6 17 12 19 6 1
0 8 7 24 24 20 24 8 1
0 9 8 32 21 50 24 32 8 1
...
For example, row 8 is: 0 7 6 17 12 19 6 1.
We have DP(8,3)=6 because there are 6 3-double-palindromes of 8: 116, 611, 224, 422, 233, and 332.
We have DP(8,4)=17 because there are 17 4-double-palindromes of 8: 1115, 5111, 1511, 1151, 1214, 4121, 1412, 2141, 1133, 3311, 1313, 3131, 1232, 2123, 3212, 2321, and 2222.
- John P. McSorley: Counting k-compositions of n with palindromic and related structures. Preprint, 2010.
See sequence
A051159 for the triangle whose (n, k) term gives the number of k-palindromes (single-palindromes) of n.
-
\\ p(n,k) is k*A119963(n,k); q(n,k) is A051159(n-1, k-1).
p(n, k) = {k*binomial((n-k%2)\2, k\2)}
q(n, k) = {if(n%2==1&&k%2==0, 0, binomial((n-1)\2, (k-1)\2))}
invphi(n) = {sumdiv(n, d, d*moebius(d))}
T(n, k) = sumdiv(gcd(n, k), d, invphi(d) * p(n/d, k/d) - moebius(d) * q(n/d, k/d)); \\ Andrew Howroyd, Sep 27 2019
A181111
'ADP(n,k)' triangle read by rows. ADP(n,k) is the number of aperiodic k-double-palindromes of n.
Original entry on oeis.org
0, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 4, 4, 4, 0, 0, 4, 2, 6, 4, 0, 0, 6, 6, 12, 12, 6, 0, 0, 6, 6, 14, 12, 16, 6, 0, 0, 8, 6, 24, 24, 18, 24, 8, 0, 0, 8, 8, 28, 20, 44, 24, 28, 8, 0, 0, 10, 10, 40, 40, 60, 60, 40, 40, 10, 0, 0, 10, 8, 44, 40, 94, 60, 88, 32, 46, 10, 0
Offset: 1
The triangle begins:
0
0 0
0 2 0
0 2 2 0
0 4 4 4 0
0 4 2 6 4 0
0 6 6 12 12 6 0
0 6 6 14 12 16 6 0
0 8 6 24 24 18 24 8 0
0 8 8 28 20 44 24 28 8 0
...
For example, row 8 is: 0 6 6 14 12 16 6 0.
We have ADP(8,3)=6 because there are 6 aperiodic 3-double-palindromes of 8: 116, 611, 224, 422, 233, and 332.
We have ADP(8,4)=14 because there are 14 4-double-palindromes of 8: 1115, 5111, 1511, 1151, 1214, 4121, 1412, 2141, 1133, 3311, 1232, 2123, 3212, and 2321.
- John P. McSorley: Counting k-compositions of n with palindromic and related structures. Preprint, 2010.
See sequence
A180653 for the triangle whose (n, k) term gives the number of k-double-palindromes of n.
See sequence
A179519 for the triangle whose (n, k) term gives the number of aperiodic k-palindromes (single-palindromes) of n.
-
\\ here p(n,k) is A119963(n,k), q(n,k) is A051159(n-1, k-1).
p(n, k) = { binomial((n-k%2)\2, k\2) }
q(n, k) = { if(n%2==1&&k%2==0, 0, binomial((n-1)\2, (k-1)\2)) }
T(n, k) = sumdiv(gcd(n, k), d, moebius(d) * (k*p(n/d, k/d) - q(n/d, k/d))); \\ Andrew Howroyd, Sep 27 2019
a(37) corrected and terms a(56) and beyond from
Andrew Howroyd, Sep 27 2019
A179317
'APE(n,k)' triangle read by rows. APE(n,k) is the number of aperiodic k-palindromes of n up to cyclic equivalence.
Original entry on oeis.org
1, 1, 0, 1, 0, 0, 1, 0, 1, 0, 1, 0, 2, 0, 0, 1, 0, 1, 1, 1, 0, 1, 0, 3, 0, 3, 0, 0, 1, 0, 3, 1, 3, 1, 1, 0, 1, 0, 3, 0, 6, 0, 4, 0, 0, 1, 0, 4, 2, 5, 2, 4, 2, 1, 0, 1, 0, 5, 0, 10, 0, 10, 0, 5, 0, 0, 1, 0, 4, 2, 10, 4, 10, 4, 4, 2, 1, 0
Offset: 1
The triangle begins
1
1,0
1,0,0
1,0,1,0
1,0,2,0,0
1,0,1,1,1,0
1,0,3,0,3,0,0
1,0,3,1,3,1,1,0
1,0,3,0,6,0,4,0,0
1,0,4,2,5,2,4,2,1,0
For example, row 8 is 1,0,3,1,3,1,1,0.
We have APE(8,3)=3 because there are 3 aperiodic 3-palindromes of 8, namely: 161, 242, and 323, and none are cyclically equivalent to the others.
We have APE(8,4)=1 because there are 2 aperiodic 4-palindromes of 8, namely: 3113 and 1331, but they are cyclically equivalent.
- John P. McSorley: Counting k-compositions of n with palindromic and related structures. Preprint, 2010.
The row sums of the 'APE(n, k)' triangle give sequence
A056513.
-
T[n_, k_] := (3-(-1)^k)/4*Sum[MoebiusMu[d]*QBinomial[n/d - 1, k/d - 1, -1], {d, Divisors[GCD[n, k]]}];
Table[T[n, k], {n, 1, 12}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 24 2019 *)
-
\\ here p(n, k)=A051159(n-1, k-1) is number of k-palindromes of n.
p(n, k) = if(n%2==1&&k%2==0, 0, binomial((n-1)\2, (k-1)\2));
T(n, k) = if(k%2,1,1/2) * 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 07 2017
A179181
'PE(n,k)' triangle read by rows. PE(n,k) is the number of k-palindromes of n up to cyclic equivalence.
Original entry on oeis.org
1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, 1, 2, 1, 1, 1, 1, 0, 3, 0, 3, 0, 1, 1, 1, 3, 2, 3, 2, 1, 1, 1, 0, 4, 0, 6, 0, 4, 0, 1, 1, 1, 4, 2, 6, 4, 4, 2, 1, 1, 1, 0, 5, 0, 10, 0, 10, 0, 5, 0, 1, 1, 1, 5, 3, 10, 6, 10, 5, 5, 3, 1, 1
Offset: 1
The triangle begins
1
1,1
1,0,1
1,1,1,1
1,0,2,0,1
1,1,2,1,1,1
1,0,3,0,3,0,1
1,1,3,2,3,2,1,1
1,0,4,0,6,0,4,0,1
1,1,4,2,6,4,4,2,1,1
For example, row 8 is 1,1,3,2,3,2,1,1.
We have PE(8,3)=3 because there are 3 3-palindromes of 8, namely: 161, 242, and 323, and none are cyclically equivalent to the others.
We have PE(8,4)=2 because there are 3 4-palindromes of 8, namely: 3113, 1331, and 2222, but 3113 and 1331 are cyclically equivalent.
- John P. McSorley: Counting k-compositions with palindromic and related structures. Preprint, 2010.
If we ignore cyclic equivalence then we have sequence
A051159.
The row sums of the 'PE(n, k)' triangle give sequence
A056503.
-
T[n_, k_] := (3 - (-1)^k)/4*Sum[MoebiusMu[d]*QBinomial[n/d - 1, k/d - 1, -1], {d, Divisors@ GCD[n, k]}]; Table[DivisorSum[GCD[n, k], T[n/#, k/#] &], {n, 12}, {k, n}] // Flatten (* Michael De Vlieger, Oct 31 2021, after Jean-François Alcover at A179317 *)
-
p(n, k) = if(n%2==1&&k%2==0, 0, binomial((n-1)\2, (k-1)\2));
APE(n, k) = if(k%2,1,1/2) * sumdiv(gcd(n,k), d, moebius(d) * p(n/d, k/d));
T(n, k) = sumdiv(gcd(n,k), d, APE(n/d, k/d));
for(n=1, 10, for(k=1, n, print1(T(n,k), ", ")); print) \\ Andrew Howroyd, Oct 07 2017
Showing 1-5 of 5 results.
Comments