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.
%I A180653 #15 Oct 30 2021 07:17:49 %S A180653 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, %T A180653 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, %U A180653 40,60,60,40,40,10,1,0,11,9,49,40,100,60,98,35,51,10,1 %N A180653 'DP(n,k)' triangle read by rows. DP(n,k) is the number of k-double-palindromes of n. %C A180653 A k-composition of n is an ordered collection of k positive integers (parts) which sum to n. A palindrome is a word which is the same when written backwards. %C A180653 A k-double-palindrome of n is a k-composition of n which is the concatenation of two palindromes, PP'=P|P', where both |P|, |P'|>=1. %C A180653 For example 1123532=11|23532 is a 7-double-palindrome of 17 since both 11 and 23532 are palindromes. %C A180653 Let DP(n,k) denote the number of k-double-palindromes of n. %C A180653 This sequence is the 'DP(n,k)' triangle read by rows. %D A180653 John P. McSorley: Counting k-compositions of n with palindromic and related structures. Preprint, 2010. %H A180653 Andrew Howroyd, <a href="/A180653/b180653.txt">Table of n, a(n) for n = 1..1275</a> %F A180653 T(n,k) = A180279(n,k) - A179519(n,k). - _Andrew Howroyd_, Sep 27 2019 %e A180653 The triangle begins %e A180653 0 %e A180653 0 1 %e A180653 0 2 1 %e A180653 0 3 2 1 %e A180653 0 4 4 4 1 %e A180653 0 5 3 8 4 1 %e A180653 0 6 6 12 12 6 1 %e A180653 0 7 6 17 12 19 6 1 %e A180653 0 8 7 24 24 20 24 8 1 %e A180653 0 9 8 32 21 50 24 32 8 1 %e A180653 ... %e A180653 For example, row 8 is: 0 7 6 17 12 19 6 1. %e A180653 We have DP(8,3)=6 because there are 6 3-double-palindromes of 8: 116, 611, 224, 422, 233, and 332. %e A180653 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. %o A180653 (PARI) \\ p(n,k) is k*A119963(n,k); q(n,k) is A051159(n-1, k-1). %o A180653 p(n, k) = {k*binomial((n-k%2)\2, k\2)} %o A180653 q(n, k) = {if(n%2==1&&k%2==0, 0, binomial((n-1)\2, (k-1)\2))} %o A180653 invphi(n) = {sumdiv(n, d, d*moebius(d))} %o A180653 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 %Y A180653 Row sums are A180750. %Y A180653 See sequence A051159 for the triangle whose (n, k) term gives the number of k-palindromes (single-palindromes) of n. %Y A180653 Cf. A179519, A180279, A180918, A181111, A181169. %K A180653 nonn,tabl %O A180653 1,5 %A A180653 _John P. McSorley_, Sep 14 2010 %E A180653 Terms a(56) and beyond from _Andrew Howroyd_, Sep 27 2019