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 A028931 #46 Jun 07 2025 16:41:57 %S A028931 0,1,20,21,310,311,4200,4201,4220,4221,53110,53111,642000,642001, %T A028931 642020,642021,642310,642311,7531200,7531201,7531220,7531221,86420110, %U A028931 86420111,86424000,86424001,86424020,86424021,86424310,86424311 %N A028931 Strings giving winning positions in Tchoukaillon (or Mancala) solitaire. %C A028931 a(n) gives string listing winning position for n stones. %C A028931 Sum of numbers in a(n) is equal to n. %C A028931 Using the chromatic (tet-12) scale, (if C=0, 12, 24...) all integers correspond to pitches C, C#, G#, A, Bb, B, a recursive pattern that evenly bisects the octave and avoids the tritone (IC6). - _Nik Bizzell-Browning_, Apr 27 2019 %H A028931 Nik Bizzell-Browning, <a href="https://sonicimmersiontheory.com/tchoukaillon-solitaire-sequence/">Tchoukaillon solitaire sequence</a>, Chromatic pitch table and example. %H A028931 Nicholas John Bizzell-Browning, <a href="https://bura.brunel.ac.uk/handle/2438/29960">LIE scales: Composing with scales of linear intervallic expansion</a>, Ph. D. Thesis, Brunel Univ. (UK, 2024). See p. 142. %H A028931 D. M. Broline and _Daniel E. Loeb_, <a href="http://arXiv.org/abs/math.CO/9502225">The combinatorics of Mancala-Type games: Ayo, Tchoukaillon and 1/Pi</a>, J. Undergrad. Math. Applic., vol. 16 (1995), pp. 21-36. %F A028931 To get the next term, if rightmost 0 is in position i, replace it by i and subtract 1 from all earlier entries. %e A028931 For example, a(10) = 53111; rightmost 0 is in position 6, so get 653111 -> a(11) = 642000. %t A028931 a[1] = {0};a[n_]:=a[n]=Module[{gs=a[n-1],len=Length[a[n-1]],pos},If[FreeQ[gs,0],Prepend[gs-1,1+len],pos=FirstPosition[Reverse[gs],0][[1]];(gs[[;;len-pos]])~Join~{pos}~Join~If[pos==1,{},(gs[[len-pos+2;;]]-1)]]];StringJoin/@Map[ToString, Array[a, 30], {2}] (* _Shenghui Yang_, Jun 06 2025 *) %Y A028931 Cf. A002491, A007952, A028920, A028932, A028933. %K A028931 nonn,nice,easy,base %O A028931 0,3 %A A028931 _N. J. A. Sloane_ %E A028931 More terms from _Erich Friedman_