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.

A266394 Square array a(n,k) is the number of terms in the "continued fraction" of the form -k1 + 1/(k2 - 1/(k3 -1/( ... for the fraction -k/n.

This page as a plain text file.
%I A266394 #6 Oct 19 2024 15:57:32
%S A266394 1,4,2,7,1,3,10,5,5,4,13,4,1,2,5,16,8,6,8,6,6,19,7,8,1,6,3,7,22,11,4,
%T A266394 7,11,2,7,8,25,10,9,5,1,5,9,4,9,28,14,11,11,8,14,7,7,8,10,31,13,7,4,9,
%U A266394 1,9,2,3,5,11,34,17,12,10,9,9,17,9,12,10,9,12
%N A266394 Square array a(n,k) is the number of terms in the "continued fraction" of the form -k1 + 1/(k2 - 1/(k3 -1/( ... for the fraction -k/n.
%C A266394 a(n,k) is the number of steps to reach 0 for the fraction -k/n in the following process: if the fraction f is positive, it is replaced by 1/f; and if it is negative, it is replaced by f+1.
%H A266394 Maxime Bourrigan, Marie Lhuissier, <a href="http://images-archive.math.cnrs.fr/Enchevetrements-rationnels-et-autres-sorcelleries-mathematiques.html">Enchevêtrements rationnels et autres sorcelleries mathématiques</a>, Images des Mathématiques, CNRS, 2015 (in French).
%e A266394 a(1, 3) is the number of steps for -3/1: -3 -> -2 -> -1 -> 0 = 3 steps.
%e A266394 a(3, 1) is the number of steps for -1/3: -1/3 -> 2/3 -> -3/2 -> -1/2 -> 1/2 -> -2 -> -1 -> 0 = 7 steps.
%e A266394 The array begins:
%e A266394    1, 2, 3, 4,  5, ...
%e A266394    4, 1, 5, 2,  6, ...
%e A266394    7, 5, 1, 8,  6, ...
%e A266394   10, 4, 6, 1, 11, ...
%e A266394   13, 8, 8, 7,  1, ...
%e A266394   ...
%o A266394 (PARI) trans(f) = if (f > 0, -1/f, if (f < 0, f+1, f));
%o A266394 count(f) = nb = 0; while(f!=0, f = trans(f); nb++); nb;
%o A266394 tabl(nn) = {for (n=1, nn, for (k=1, nn, print1(count(-k/n), ", ");); print(););}
%Y A266394 Cf. A000012 (diagonal), A016777 (1st column), A168230 (2nd line).
%K A266394 nonn,tabl
%O A266394 1,2
%A A266394 _Michel Marcus_, Dec 29 2015