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 A322823 #8 Dec 30 2018 00:05:03 %S A322823 0,0,0,0,0,1,0,1,0,1,0,2,0,1,2,0,0,1,0,3,2,1,0,2,0,1,2,3,0,2,0,1,2,1, %T A322823 4,3,0,1,2,3,0,2,0,3,4,1,0,2,0,1,2,3,0,2,4,3,2,1,0,3,0,1,5,3,4,2,0,3, %U A322823 2,4,0,3,0,1,2,3,5,2,0,4,0,1,0,3,4,1,2,3,0,4,5,3,2,1,4,2,0,1,6,3,0,2,0,3,4 %N A322823 a(n) = 0 if n is 1 or a Fermi-Dirac prime (A050376), otherwise a(n) = 1 + a(A300840(n)). %C A322823 For n > 1, a(n) gives the number of edges needed to traverse from n to reach the leftmost branch (where the terms of A050376 are located) in the binary tree illustrated in A052330. %H A322823 Antti Karttunen, <a href="/A322823/b322823.txt">Table of n, a(n) for n = 1..65537</a> %F A322823 a(1) = 0; for n > 1, if A302777(n) == 1, a(n) = 0, otherwise a(n) = 1 + a(A300840(n)). %o A322823 (PARI) %o A322823 up_to = 10000; %o A322823 ispow2(n) = (n && !bitand(n,n-1)); %o A322823 A302777(n) = ispow2(isprimepower(n)); %o A322823 A050376list(up_to) = { my(v=vector(up_to), i=0); for(n=1,oo,if(A302777(n), i++; v[i] = n); if(i == up_to,return(v))); }; %o A322823 v050376 = A050376list(up_to); %o A322823 A050376(n) = v050376[n]; %o A322823 A052330(n) = { my(p=1,i=1); while(n>0, if(n%2, p *= A050376(i)); i++; n >>= 1); (p); }; %o A322823 A052331(n) = { my(s=0,e); while(n > 1, fordiv(n, d, if(((n/d)>1)&&ispow2(isprimepower(n/d)), e = vecsearch(v050376, n/d); if(!e, print("v050376 too short!"); return(1/0)); s += 2^(e-1); n = d; break))); (s); }; %o A322823 A300840(n) = A052330(A052331(n)>>1); %o A322823 A322823(n) = if((1==n)||(1==A302777(n)),0,1+A322823(A300840(n))); %Y A322823 Cf. A050376, A052330, A052331, A302777, A300840, A322822. %K A322823 nonn %O A322823 1,12 %A A322823 _Antti Karttunen_, Dec 29 2018