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.

A233321 Triangle read by rows: T(n,k) = number of palindromic partitions of n in which the largest part is equal to k, 1 <= k <= n.

This page as a plain text file.
%I A233321 #30 Oct 10 2017 12:08:34
%S A233321 1,1,1,1,0,1,1,2,0,1,1,1,1,0,1,1,3,1,1,0,1,1,1,3,0,1,0,1,1,4,2,3,0,1,
%T A233321 0,1,1,2,4,1,2,0,1,0,1,1,5,3,5,1,2,0,1,0,1,1,2,6,2,4,0,2,0,1,0,1,1,6,
%U A233321 5,8,2,4,0,2,0,1,0,1,1,3,8,3,7,1,3,0,2,0,1,0,1,1,7,7,11,4,7,1,3,0,2,0,1,0,1
%N A233321 Triangle read by rows: T(n,k) = number of palindromic partitions of n in which the largest part is equal to k, 1 <= k <= n.
%C A233321 A partition of n is said to be "palindromic" if its parts can be arranged to form a palindrome in at least one way (cf. A025065).
%H A233321 Andrew Howroyd, <a href="/A233321/b233321.txt">Table of n, a(n) for n = 1..1275</a>
%e A233321 Triangle begins:
%e A233321 1;
%e A233321 1, 1;
%e A233321 1, 0, 1;
%e A233321 1, 2, 0, 1;
%e A233321 1, 1, 1, 0, 1;
%e A233321 1, 3, 1, 1, 0, 1;
%e A233321 1, 1, 3, 0, 1, 0, 1;
%e A233321 1, 4, 2, 3, 0, 1, 0, 1;
%e A233321 1, 2, 4, 1, 2, 0, 1, 0, 1;
%e A233321 1, 5, 3, 5, 1, 2, 0, 1, 0, 1;
%e A233321 1, 2, 6, 2, 4, 0, 2, 0, 1, 0, 1;
%e A233321 ...
%t A233321 (* run this first: *)
%t A233321 Needs["Combinatorica`"];
%t A233321 (* run the following in a different cell: *)
%t A233321 a233321[n_] := {}; Do[Do[a = Partitions[n]; count = 0; Do[If[Max[a[[j]]] == k, x = Permutations[a[[j]]]; Do[If[x[[m]] == Reverse[x[[m]]], count++; Break[]], {m, Length[x]}]], {j, Length[a]}]; AppendTo[a233321[n], count], {k, n}], {n, nmax}]; Table[a233321[n], {n, nmax}](* _L. Edson Jeffery_, Oct 09 2017 *)
%o A233321 (PARI) \\ here V(n,k) is A233322.
%o A233321 PartitionCount(n,maxpartsize)={my(t=0); forpart(p=n, t++, maxpartsize); t}
%o A233321 V(n,k)=sum(i=0, (k-n%2)\2, PartitionCount(n\2-i, k));
%o A233321 T(n,k)=V(n,k)-V(n,k-1);
%o A233321 for(n=1, 10, for(k=1, n, print1(T(n,k), ", ")); print) \\ _Andrew Howroyd_, Oct 09 2017
%Y A233321 Cf. A025065 (row sums), A233322.
%Y A233321 Cf. A233323-A233324 (palindromic compositions of n).
%K A233321 nonn,tabl
%O A233321 1,8
%A A233321 _L. Edson Jeffery_, Dec 10 2013
%E A233321 Corrected row 7 as communicated by _Andrew Howroyd_. - _L. Edson Jeffery_, Oct 09 2017