Hi all,
I'd like some feedback before formally submitting this through the
OEIS web form, in case anyone recognizes it or spots an issue.
Background: a recent blog series (blog.klipse.tech, "Aboulafia"
series, July 2026)[0] that I came across on HN revisits a 13th-century
enumeration rule by the Kabbalist Abraham Aboulafia[1] for listing all
permutations of a word by repeatedly rotating the first letter to the
back and recursing. The series shows this order is identical to the
one produced by Zaks' 1984 suffix-reversal algorithm (itself the
mirror image of the prefix-reversal sequence from Bill Gates' only
paper, with Papadimitriou, on pancake sorting)[2][3]. I verified this
equivalence computationally up to n=10, and separately confirmed that
the suffix/prefix reversal-length sequence for this order is exactly
A055881(m)+1, and that its total length for n symbols is n!-1 =
A033312(n).
The series also observes that if you place the n! permutations on a
circle in this order and draw a chord from each permutation to its
reversal, the chords visually organize into a dense caustic curve
starting around n=7. I wanted a numeric handle on that rather than
just an eyeballed image, so I computed the number of pairs of chords
that cross, for n=2..10:
n : 2, 3, 4, 5, 6, 7, 8, 9, 10
a(n): 0, 0, 18, 620, 24300, 1216320, 78015840,
6295423680, 625975560000
(Offset 2; for n=1 there's nothing to pair, and no permutation of n>=2
distinct symbols equals its own reversal, so there are no fixed
points/loops -- every point gets matched, giving exactly n!/2 chords.)
I searched OEIS, Wolfram|Alpha, and Google using both the individual
terms and the combinations 18,620,24300,1216320 and
1216320,78015840,
6295423680, and found no matches, including under
obvious transformations. I don't have a closed form for a(n). One
thing I did notice: the fraction of possible chord-pairs that actually
cross, a(n) / C(n!/2, 2) (total number of chord-pairs), rises to a
peak around n=7-8 (~0.384) and then decreases (0.382 at n=9, 0.380 at
n=10) -- which lines up with the blog's qualitative observation
visually form a dense caustic-like curve right around n=7.
Generator (Python, verified against a slower O(chords^2) brute-force
check for n<=7, and consistent with a Fenwick tree[5] O(N log N) sweep
up to n=10):
def g(n):
if n == 1: return []
p = g(n - 1)
return (p + [n]) * (n - 1) + p
# generate permutations by repeated suffix reversal, pair each with
# its reversal's position in the sequence, then count crossing chords
# via a Fenwick tree sweep (O(N log N)).
I'm happy to post the full script if useful. Proposed
cross-references: A000142 (n!), A033312 (n!-1, move count), A055881
(per-move reversal lengths), A235748 (companion ruler sequence for
rotation-generation of S_n).
Any thoughts on whether this is a reasonable addition, and whether the
offset/keyword choices above (nonn,more) look right, would be
appreciated before I submit.
Thanks,
Dario
PS: links:
[0]
https://blog.klipse.tech/aboulafia/2026/07/06/a-13th-century-enumeration-algorithm-ignored-for-700-years.html
[1]
https://es.wikipedia.org/wiki/Abraham_Abulafia
[2]
https://www.sciencedirect.com/science/article/pii/0012365X79900682
[3]
https://en.wikipedia.org/wiki/Pancake_sorting
[4]
https://link.springer.com/article/10.1007/BF01937486
[5]
https://en.wikipedia.org/wiki/Fenwick_tree