A352875 Number of integer compositions y of n with a fixed point y(i) = i.
0, 1, 1, 2, 5, 10, 21, 42, 86, 174, 351, 708, 1424, 2861, 5743, 11520, 23092, 46269, 92673, 185562, 371469, 743491, 1487870, 2977164, 5956616, 11916910, 23839736, 47688994, 95393322, 190811346, 381662507, 763389209, 1526881959, 3053930971, 6108131542, 12216698288
Offset: 0
Keywords
Examples
The a(0) = 0 through a(5) = 10 compositions (empty column indicated by dot): . (1) (11) (12) (13) (14) (111) (22) (32) (112) (113) (121) (122) (1111) (131) (221) (1112) (1121) (1211) (11111)
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
Crossrefs
Programs
-
Mathematica
pq[y_]:=Length[Select[Range[Length[y]],#==y[[#]]&]]; Table[Length[Select[Join@@Permutations/@IntegerPartitions[n],pq[#]>0&]],{n,0,15}]
-
PARI
S(v,u,c)={vector(#v, k, c + sum(i=1, k-1, v[k-i]*u[i]))} seq(n)={my(v=vector(1+n), s=vector(#v, i, 2^(i-2))); v[1]=1; s[1]=0; for(i=1, n, v=S(v, vector(n, j, if(j==i,'x,1)), O(x)); s-=apply(p->polcoef(p,0), v)); s} \\ Andrew Howroyd, Jan 02 2023
Formula
a(n) = 2^(n-1) - A238351(n) for n >= 1. - Andrew Howroyd, Jan 02 2023
Extensions
Terms a(21) and beyond from Andrew Howroyd, Jan 02 2023