Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Search: a105154 -id:a105154
     Sort: relevance | references | number | modified | created      Format: long | short | data
2^a(n)=A105154(n).
+20
0
0, 0, 1, 1, 1, 0, 1, 0, 2, 1, 1, 2, 2, 1, 1, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 2, 2, 0, 2, 3, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 4, 3, 2, 1, 2, 3, 4, 1, 4, 3, 2, 1, 2, 3, 4, 1, 4, 3, 2, 1, 2, 3, 4, 1, 4, 3, 2, 1, 2, 3, 4, 1, 4
OFFSET
0,9
KEYWORD
nonn
AUTHOR
Philippe Deléham, Apr 01 2010
STATUS
approved
Consider trajectory of n under repeated application of map k -> A105025(k); a(n) = length of cycle.
+10
2
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, 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, 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
OFFSET
0,3
COMMENTS
Why is this always a power of 2?
LINKS
David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [pdf, ps].
PROG
(C++) #include <iostream> #include <vector> #include <set> 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
(Haskell)
a105153 n = t [n] where
t xs@(x:_) | y `elem` xs = length xs
| otherwise = t (y : xs) where y = a105025 x
-- Reinhard Zumkeller, Jul 21 2012
CROSSREFS
Positions of 1's: A105271.
KEYWORD
nonn,easy,base
AUTHOR
Philippe Deléham, Apr 30 2005
EXTENSIONS
More terms from R. J. Mathar, Aug 10 2007
STATUS
approved
Consider trajectory of n under repeated application of map k --> A105108(k); a(n) = length of cycle.
+10
0
1, 1, 1, 3, 3, 3, 3, 3, 3, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 3, 1, 9, 1, 9, 3, 1, 9, 3, 1, 9, 3, 1, 9, 3, 1, 9, 3, 1, 9, 3, 1, 9, 3, 1
OFFSET
0,4
COMMENTS
Why is this always a power of 3?
LINKS
David Applegate, Benoit Cloitre, Philippe Deléham and N. J. A. Sloane, Sloping binary numbers: a new sequence related to the binary numbers [pdf, ps].
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Philippe Deléham, Apr 30 2005
STATUS
approved

Search completed in 0.007 seconds