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.

A055662 Successive positions in Tower of Hanoi (with three pegs {0,1,2}) where xyz means smallest disk is on peg z, second smallest is on peg y, third smallest on peg x, etc. and leading zeros indicate largest disks are all on peg 0.

This page as a plain text file.
%I A055662 #22 Dec 03 2021 17:23:48
%S A055662 0,1,21,22,122,120,110,111,2111,2112,2102,2100,2200,2201,2221,2222,
%T A055662 12222,12220,12210,12211,12011,12012,12002,12000,11000,11001,11021,
%U A055662 11022,11122,11120,11110,11111,211111,211112,211102,211100,211200
%N A055662 Successive positions in Tower of Hanoi (with three pegs {0,1,2}) where xyz means smallest disk is on peg z, second smallest is on peg y, third smallest on peg x, etc. and leading zeros indicate largest disks are all on peg 0.
%C A055662 Optimal for moving an even number of disks from peg 0 to peg 2 or an odd number from peg 0 to peg 1.
%H A055662 <a href="/index/To#Hanoi">Index entries for sequences related to Towers of Hanoi</a>
%F A055662 a(n) = Sum_{j=0..floor(log_2(n))} 10^j * (floor((n/2^j + 1)/2)*(-1)^j mod 3).
%t A055662 a[n_]:=Sum[10^j*(Mod[(-1)^j*Floor[(n/2^j + 1)/2],3]), {j,0,Floor[Log2[n]]}]; Array[a, 70, 0] (* _Stefano Spezia_, Oct 27 2018 *)
%Y A055662 Cf. A001511, A055661.
%Y A055662 Cf. A060572.
%K A055662 nonn
%O A055662 0,3
%A A055662 _Henry Bottomley_, Jun 06 2000