login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A263897 Number of anagram compositions of 2n that can be formed from the compositions of n. 2
1, 1, 2, 6, 16, 44, 134, 414, 1290, 4102, 13306, 43718, 145176, 487384, 1651154, 5636702, 19381392, 67074420, 233483430, 817106622, 2873589060, 10151255976, 36009769278, 128231072994, 458268615966, 1643227382022, 5910606009330, 21322486928518, 77132729929864 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,3

COMMENTS

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.

a(n) is the number of anagram compositions of 2n with no central summand.

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.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 0..1000

Miklos Bona, Rebecca Smith, An Involution on Involutions and a Generalization of Layered Permutations, arXiv preprint arXiv:1605.06158 [math.CO], 2016. See Theorem 4.3.

EXAMPLE

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.

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.

MAPLE

b:= proc(n, i, p) option remember; `if`(n=0, p!^2,

      `if`(i<1, 0, add(b(n-i*j, i-1, p+j)/j!^2, j=0..n/i)))

    end:

a:= n-> b(n$2, 0):

seq(a(n), n=0..35);  # Alois P. Heinz, Oct 29 2015

MATHEMATICA

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

PROG

(Python)

from sympy.core.cache import cacheit

from sympy import factorial as f

@cacheit

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))

def a(n): return b(n, n, 0)

print([a(n) for n in range(36)]) # Indranil Ghosh, Aug 18 2017, after Maple code

CROSSREFS

First differences of A097085.

Sequence in context: A026134 A105696 A074413 * A209629 A055544 A126285

Adjacent sequences:  A263894 A263895 A263896 * A263898 A263899 A263900

KEYWORD

nonn

AUTHOR

Gregory L. Simay, Oct 28 2015

EXTENSIONS

a(9)-a(28) from Alois P. Heinz, Oct 29 2015

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 27 05:28 EST 2021. Contains 341649 sequences. (Running on oeis4.)