login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A179181 'PE(n,k)' triangle read by rows. PE(n,k) is the number of k-palindromes of n up to cyclic equivalence. 3

%I #18 Nov 02 2021 06:30:58

%S 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,

%T 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,

%U 1,5,3,10,6,10,5,5,3,1,1

%N 'PE(n,k)' triangle read by rows. PE(n,k) is the number of k-palindromes of n up to cyclic equivalence.

%C A k-composition of n is an ordered collection of k positive integers (parts) which sum to n.

%C Two k-compositions of n are cyclically equivalent if one can be obtained from the other by a cyclic permutation of its parts.

%C A k-palindrome of n is a k-composition of n which is a palindrome.

%C Let PE(n,k) denote the number of k-palindromes of n up to cyclic equivalence.

%C This sequence is the 'PE(n,k)' triangle read by rows.

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

%H Andrew Howroyd, <a href="/A179181/b179181.txt">Table of n, a(n) for n = 1..1275</a>

%F PE(n, k) = Sum_{d | gcd(n,k)} A179317(n/d, k/d). - _Andrew Howroyd_, Oct 07 2017

%e The triangle begins

%e 1

%e 1,1

%e 1,0,1

%e 1,1,1,1

%e 1,0,2,0,1

%e 1,1,2,1,1,1

%e 1,0,3,0,3,0,1

%e 1,1,3,2,3,2,1,1

%e 1,0,4,0,6,0,4,0,1

%e 1,1,4,2,6,4,4,2,1,1

%e For example, row 8 is 1,1,3,2,3,2,1,1.

%e 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.

%e 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.

%t 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 *)

%o (PARI)

%o p(n, k) = if(n%2==1&&k%2==0, 0, binomial((n-1)\2, (k-1)\2));

%o APE(n, k) = if(k%2,1,1/2) * sumdiv(gcd(n,k), d, moebius(d) * p(n/d, k/d));

%o T(n, k) = sumdiv(gcd(n,k), d, APE(n/d, k/d));

%o for(n=1, 10, for(k=1, n, print1(T(n,k), ", ")); print) \\ _Andrew Howroyd_, Oct 07 2017

%Y If we ignore cyclic equivalence then we have sequence A051159.

%Y The row sums of the 'PE(n, k)' triangle give sequence A056503.

%Y Cf. A179317, A179519.

%K nonn,tabl

%O 1,13

%A _John P. McSorley_, Jun 30 2010

%E Terms a(56) and beyond from _Andrew Howroyd_, Oct 07 2017

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified July 24 09:48 EDT 2024. Contains 374583 sequences. (Running on oeis4.)