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 A105153 #18 Apr 28 2025 07:04:18 %S A105153 1,1,2,2,1,2,1,2,4,2,2,4,4,2,2,4,4,1,4,4,4,1,4,4,4,1,4,4,4,1,4,4,4,4, %T A105153 8,4,4,4,4,8,4,4,8,4,4,4,4,8,4,4,8,4,4,4,4,8,4,4,8,4,4,4,4,8,2,16,8,4, %U A105153 2,4,8,16,2,16,8,4,2,4,8,16,2,16,8,4,2,4,8,16,2,16,8,4,2,4,8,16,2,16,8,4,2 %N A105153 Consider trajectory of n under repeated application of map k -> A105025(k); a(n) = length of cycle. %C A105153 Why is this always a power of 2? %H A105153 Reinhard Zumkeller, <a href="/A105153/b105153.txt">Table of n, a(n) for n = 0..10000</a> %H A105153 David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [<a href="http://neilsloane.com/doc/slopey.pdf">pdf</a>, <a href="http://neilsloane.com/doc/slopey.ps">ps</a>]. %o A105153 (C++) %o A105153 #include <iostream> %o A105153 #include <vector> %o A105153 #include <set> %o A105153 using namespace std ; int main(int argc, char *argv[]) { int kmax = 8 ; vector<int> a105025; a105025.push_back(0) ; a105025.push_back(1) ; for(int k=1 ; k < kmax ; k++) { int bstrt = 1 << k ; for(int j=0 ; j < bstrt ; j++) { int s = bstrt ; for(int i= k-1 ; i >=0 ; i--) s += (bstrt+j+k-i) & ( 1<<i) ; a105025.push_back(s) ; /* cout << s << endl ; */ } } for(int n=0; n < a105025.size() ; n++) { int nrep = n ; set<int> traj ; while ( traj.find(nrep) == traj.end() ) { traj.insert(nrep) ; if ( nrep < a105025.size() ) nrep = a105025[nrep] ; else break ; } cout << traj.size() << ", " ; } cout << endl ; return 0 ; } // _R. J. Mathar_, Aug 10 2007 %o A105153 (Haskell) %o A105153 a105153 n = t [n] where %o A105153 t xs@(x:_) | y `elem` xs = length xs %o A105153 | otherwise = t (y : xs) where y = a105025 x %o A105153 -- _Reinhard Zumkeller_, Jul 21 2012 %Y A105153 Positions of 1's: A105271. %Y A105153 Cf. A102370, A105025, A105027, A105154. %K A105153 nonn,easy,base %O A105153 0,3 %A A105153 _Philippe Deléham_, Apr 30 2005 %E A105153 More terms from _R. J. Mathar_, Aug 10 2007