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.

A001266 One-half the number of permutations of length n without rising or falling successions.

This page as a plain text file.
%I A001266 M4426 N1871 #44 Apr 25 2025 17:10:24
%S A001266 0,0,1,7,45,323,2621,23811,239653,2648395,31889517,415641779,
%T A001266 5830753109,87601592187,1403439027805,23883728565283,430284458893701,
%U A001266 8181419271349931,163730286973255373,3440164703027845395,75718273707281368117,1742211593431076483419
%N A001266 One-half the number of permutations of length n without rising or falling successions.
%C A001266 (1/2) times number of permutations of 1, 2..., n such that none of the following occur: 12, 23, ..., (n-1)n, 21, 32, ..., n(n-1).
%C A001266 a(n) is also the number of Hamiltonian paths in the n-path complement graph. - _Eric W. Weisstein_, Apr 11 2018
%D A001266 F. N. David, M. G. Kendall and D. E. Barton, Symmetric Function and Allied Tables, Cambridge, 1966, p. 263.
%D A001266 N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
%D A001266 N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
%H A001266 Seiichi Manyama, <a href="/A001266/b001266.txt">Table of n, a(n) for n = 2..450</a> (first 199 terms from Alois P. Heinz)
%H A001266 J. Riordan, <a href="http://projecteuclid.org/euclid.aoms/1177700181">A recurrence for permutations without rising or falling successions</a>, Ann. Math. Statist. 36 (1965), 708-710.
%H A001266 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HamiltonianPath.html">Hamiltonian Path</a>
%H A001266 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/PathComplementGraph.html">Path Complement Graph</a>
%F A001266 a(n) = A002464(n)/2 = A086856(n, 0).
%F A001266 (1/2) times coefficient of t^0 in S[n](t) defined in A002464.
%p A001266 S:= proc(n) option remember; `if`(n<4, [1, 1, 2*t, 4*t+2*t^2]
%p A001266        [n+1], expand((n+1-t)*S(n-1) -(1-t)*(n-2+3*t)*S(n-2)
%p A001266        -(1-t)^2*(n-5+t)*S(n-3) +(1-t)^3*(n-3)*S(n-4)))
%p A001266     end:
%p A001266 a:= n-> coeff(S(n), t, 0)/2:
%p A001266 seq(a(n), n=2..25);  # _Alois P. Heinz_, Jan 11 2013
%t A001266 S[n_] := S[n] = If[n<4, {1, 1, 2*t, 4*t + 2*t^2}[[n+1]], Expand[(n+1-t)*S[n-1] - (1-t)*(n-2+3*t)*S[n-2] - (1-t)^2*(n-5+t)*S[n-3] + (1-t)^3*(n-3)*S[n-4]]]; a[n_] := Coefficient[S[n], t, 0]/2; Table[a[n], {n, 2, 25}] (* _Jean-François Alcover_, Mar 24 2014, after _Alois P. Heinz_ *)
%t A001266 CoefficientList[Series[((Exp[(1 + x)/((-1 + x) x)] (1 + x) Gamma[0, (1 + x)/((-1 + x) x)])/((-1 + x) x) - x - 1)/(2 x), {x, 0, 20}], x] (* _Eric W. Weisstein_, Apr 11 2018 *)
%t A001266 RecurrenceTable[{a[n] == (n + 1) a[n - 1] - (n - 2) a[n - 2] - (n - 5) a[n - 3] + (n - 3) a[n - 4], a[0] == a[1] == 1/2,
%t A001266 a[2] == a[3] == 0}, a, {n, 2, 20}] (* _Eric W. Weisstein_, Apr 11 2018 *)
%Y A001266 Sequence A002464 divided by 2 for n >= 2. A diagonal of A010028. A086856.
%K A001266 nonn
%O A001266 2,4
%A A001266 _N. J. A. Sloane_
%E A001266 More terms from Barbara Haas Margolius (margolius(AT)math.csuohio.edu), Feb 16 2001