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.

A263897 Number of anagram compositions of 2n that can be formed from the compositions of n.

This page as a plain text file.
%I A263897 #42 May 03 2020 13:45:37
%S A263897 1,1,2,6,16,44,134,414,1290,4102,13306,43718,145176,487384,1651154,
%T A263897 5636702,19381392,67074420,233483430,817106622,2873589060,10151255976,
%U A263897 36009769278,128231072994,458268615966,1643227382022,5910606009330,21322486928518,77132729929864
%N A263897 Number of anagram compositions of 2n that can be formed from the compositions of n.
%C A263897 A composition of n is an ordered sequence of positive integers whose sum is n. An anagram composition of n can be divided into two consecutive subsequences having the same parts, with a central part between the subsequences permitted.
%C A263897 a(n) is the number of anagram compositions of 2n with no central summand.
%C A263897 Here is a computation algorithm: List the individual partitions of n. Then for each partition, determine the corresponding number of compositions. Square each of these numbers then add them together.
%H A263897 Alois P. Heinz, <a href="/A263897/b263897.txt">Table of n, a(n) for n = 0..1000</a>
%H A263897 Miklos Bona, Rebecca Smith, <a href="https://arxiv.org/abs/1605.06158">An Involution on Involutions and a Generalization of Layered Permutations</a>, arXiv preprint arXiv:1605.06158 [math.CO], 2016. See Theorem 4.3.
%e A263897 For n=3, the compositions are [3], [1,2], [2,1], [1,1,1]. The anagram compositions of 2*3=6 are [3][3], [1,2][1,2], [1,2][2,1], [2,1][1,2], [2,1][2,1], [1,1,1][1,1,1], so there are a(3)=6 anagram compositions in all.
%e A263897 For n=4, the individual partitions are [4], [3,1], [2,2], [2,1,1] and [1,1,1,1]. The corresponding number of compositions are 1, 2, 1, 3, and 1. The corresponding squares of these numbers are 1, 4, 1, 9, and 1. The sum of these squares is a(4)=16.
%p A263897 b:= proc(n, i, p) option remember; `if`(n=0, p!^2,
%p A263897       `if`(i<1, 0, add(b(n-i*j, i-1, p+j)/j!^2, j=0..n/i)))
%p A263897     end:
%p A263897 a:= n-> b(n$2, 0):
%p A263897 seq(a(n), n=0..35);  # _Alois P. Heinz_, Oct 29 2015
%t A263897 b[n_, i_, p_] := b[n, i, p] = If[n == 0, p!^2, If[i<1, 0, Sum[b[n-i*j, i-1, p+j]/j!^2, {j, 0, n/i}]]]; a[n_] := b[n, n, 0]; Table[a[n], {n, 0, 35}] (* _Jean-François Alcover_, Nov 05 2015, after _Alois P. Heinz_ *)
%o A263897 (Python)
%o A263897 from sympy.core.cache import cacheit
%o A263897 from sympy import factorial as f
%o A263897 @cacheit
%o A263897 def b(n, i, p): return f(p)**2 if n==0 else 0 if i<1 else sum(b(n - i*j, i - 1, p + j)//f(j)**2 for j in range(n//i + 1))
%o A263897 def a(n): return b(n, n, 0)
%o A263897 print([a(n) for n in range(36)]) # _Indranil Ghosh_, Aug 18 2017, after Maple code
%Y A263897 First differences of A097085.
%K A263897 nonn
%O A263897 0,3
%A A263897 _Gregory L. Simay_, Oct 28 2015
%E A263897 a(9)-a(28) from _Alois P. Heinz_, Oct 29 2015