login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Von Neumann ordinals in bracket notation encoded by binary bits: '{' -> 0, '}'-> 1.
2

%I #111 Dec 12 2024 23:12:02

%S 1,3,39,9807,642665631,2760227864398567743,

%T 50917216999682251351660181504218706559,

%U 17326231117678921325668214077168498563134593883851671914433735718213795341567

%N Von Neumann ordinals in bracket notation encoded by binary bits: '{' -> 0, '}'-> 1.

%C If brackets are interpreted as 90-degree turns, and left bracket is turn left and go forward 1 unit, right bracket is turn right and go forward 1 unit, then a Levy C curve is drawn.

%e For n=3, Von Neumann's 3-element set {0, 1, 2} is

%e { {}, {{}}, {{},{{}}} }

%e 0 01 0011 001 00111 1 binary = a(3) = 9807

%t With[{nmax=8},Map[FromDigits[#,2]&,NestList["0"<>StringTake[#,{2,-2}]<>#<>"1"&,"01",nmax]]] (* _Paolo Xausa_, Nov 20 2023 *)

%o (PARI) a(n) = my(k = 1); for(m = 1, n, k = (k-1)*2^(2^m)+2*k+1); k; \\ _Thomas Scheuerle_, Nov 21 2023

%o (Python)

%o from functools import lru_cache

%o @lru_cache(maxsize=None)

%o def A367033(n): return 1-(m:=1<<(2<<n-1)) +(m+2)*A367033(n-1) if n>0 else 1

%Y Cf. A092124 (bit complement), A333447 (bit reversal), A308187 (individual bits).

%K nonn,base,easy,changed

%O 0,2

%A _Stuart E Anderson_, Nov 20 2023

%E a(7) from _Paolo Xausa_, Nov 20 2023

%E Offset corrected by _Kevin Ryde_, Dec 24 2023