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 A007972 #40 Mar 31 2025 12:23:19 %S A007972 2,15,52,129,266,487,820,1297,1954,2831,3972,5425,7242,9479,12196, %T A007972 15457,19330,23887,29204,35361,42442,50535,59732,70129,81826,94927, %U A007972 109540,125777,143754,163591,185412,209345,235522,264079,295156,328897,365450,404967,447604 %N A007972 Number of permutations that are 2 "block reversals" away from 12...n. %H A007972 Sean A. Irvine, <a href="/A007972/b007972.txt">Table of n, a(n) for n = 3..100</a> %F A007972 a(n) = (n^4+6*n^3+11*n^2-12*n+6)/6 (conjectured). - _Giovanni Resta_, Jun 08 2015 %F A007972 Conjectured g.f.: (-2-5x+3x^2+x^3-x^4)/(-1+x)^5. - _Benedict W. J. Irwin_, Feb 20 2016 %F A007972 a(n) = A228396(n) - A000124(n-1). See C. Homberger links from A228396. This proves the above conjectured formulas up to offset. - _Martin Fuller_, Mar 31 2025 %t A007972 a[n_] := Block[{s, allb, r = Flatten[Table[{i, j}, {i, n}, {j, i + 1, n}], 1]}, allb[pp_] := Union@ Table[ s=pp; s[[Range @@ e]] = Reverse[ s[[ Range @@ e]]]; s, {e, r}]; Length[Flatten[allb /@ allb[Range[n]], 1] // Union] - 1]; a /@ Range[3,15] (* _Giovanni Resta_, Jun 08 2015 *) %Y A007972 Cf. A007973, A007974, A007975. %Y A007972 Cf. A000124, A228396, A228397. %Y A007972 Column k=2 of A300003. %K A007972 nonn %O A007972 3,1 %A A007972 _J. H. Conway_ %E A007972 a(9)-a(41) from _Giovanni Resta_, Jun 08 2015 %E A007972 Edited by _Martin Fuller_, Mar 31 2025