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 A078628 #30 Jul 07 2025 23:27:08 %S A078628 1,1,0,4,12,76,494,3662,30574,284398,2918924,32791604,400400062, %T A078628 5281683678,74866857910,1135063409918,18330526475060,314169905117860, %U A078628 5695984717957246,108921059813769710,2190998123920252622,46250325111346491694 %N A078628 Number of ways of arranging the numbers 1..n in a circle so that there is no consecutive triple i, i+1, i+2 or i, i-1, i-2 (mod n). %C A078628 This sequence can be related to A165964 by the use of auxiliary sequences (and the auxiliary sequences can themselves be calculated by recurrence relations). So if we desire we can determine any value of this sequence. [From _Isaac Lambert_, Oct 07 2009] %D A078628 Wayne M. Dymacek, Isaac Lambert and Kyle Parsons, Arithmetic Progressions in Permutations, http://math.ku.edu/~ilambert/CN.pdf, 2012. - From _N. J. A. Sloane_, Sep 14 2012 %H A078628 Isaac Lambert, <a href="/A078628/b078628.txt">Table of n, a(n) for n = 1..50</a> %H A078628 Wayne M. Dymáček and Isaac Lambert, <a href="http://www.cs.uwaterloo.ca/journals/JIS/VOL14/Dymacek/dymacek5.html">Circular Permutations Avoiding Runs of i, i+1, i+2 or i, i-1, i-2</a>, Journal of Integer Sequences, Vol. 14 (2011), Article 11.1.6. %H A078628 Sean A. Irvine, <a href="https://github.com/archmageirvine/joeis/blob/master/src/irvine/oeis/a078/A078628.java">Java program</a> (github) %H A078628 N. J. A. Sloane, <a href="/A078628/a078628.txt">FORTRAN program</a> %H A078628 <a href="/index/La#lacings">Index entries for sequences related to shoe lacings</a> %e A078628 a(4) = 4: 4 2 1 3, 4 3 1 2, 4 1 3 2, 4 2 3 1. %e A078628 a(5) = 12: 5 3 1 2 4, 5 2 3 1 4, 5 4 2 1 3, 5 2 4 1 3, 5 1 4 2 3, 5 2 1 4 3, 5 1 3 4 2, 5 3 1 4 2, 5 4 1 3 2, 5 3 4 1 2, 5 2 4 3 1, 5 3 2 4 1. %Y A078628 Cf. A078673. See A002816, A078603 for analogous sequence with restrictions only on pairs. %Y A078628 Cf. A095816, A165963, A165964. %K A078628 nonn %O A078628 1,4 %A A078628 _N. J. A. Sloane_, Dec 12 2002 %E A078628 a(11)-a(13) from _John W. Layman_, Nov 15 2004 %E A078628 a(14) from _Isaac Lambert_, Oct 07 2009