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 A240737 #15 Mar 03 2021 21:50:50 %S A240737 1,1,3,4,12,23,47,100,198,404,818,1652,3319,6686,13426,26947,54043, %T A240737 108331,217059,434731,870472,1742558,3487710,6979593,13965902, %U A240737 27942597,55902624,111833288,223711791,447496476,895110536,1790410758,3581127635,7162749398 %N A240737 Number of compositions of n having exactly two fixed points. %H A240737 Joerg Arndt and Alois P. Heinz, <a href="/A240737/b240737.txt">Table of n, a(n) for n = 3..1000</a> %H A240737 M. Archibald, A. Blecher, and A. Knopfmacher, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL23/Blecher/arch14.html">Fixed Points in Compositions and Words</a>, J. Int. Seq., Vol. 23 (2020), Article 20.11.1. %F A240737 a(n) ~ c * 2^n, where c = 0.10426192955737153473390619611670767950197436882607451088699497466613223911... . - _Vaclav Kotesovec_, Sep 07 2014 %e A240737 a(5) = 3: 113, 122, 1211. %e A240737 a(6) = 4: 1131, 1212, 1221, 12111. %e A240737 a(7) = 12: 124, 133, 223, 1114, 1132, 1213, 1222, 11311, 12112, 12121, 12211, 121111. %p A240737 b:= proc(n, i) option remember; `if`(n=0, 1, series( %p A240737 add(b(n-j, i+1)*`if`(i=j, x, 1), j=1..n), x, 3)) %p A240737 end: %p A240737 a:= n-> coeff(b(n, 1), x, 2): %p A240737 seq(a(n), n=3..40); %t A240737 b[n_, i_] := b[n, i] = If[n == 0, 1, Series[Sum[b[n-j, i+1]*If[i == j, x, 1], {j, 1, n}], {x, 0, 3}]]; a[n_] := SeriesCoefficient[b[n, 1], {x, 0, 2}]; Table[a[n], {n, 3, 40}] (* _Jean-François Alcover_, Nov 07 2014, after Maple *) %Y A240737 Column k=2 of A238349 and of A238350. %K A240737 nonn %O A240737 3,3 %A A240737 _Joerg Arndt_ and _Alois P. Heinz_, Apr 11 2014