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 A179016 #59 Sep 12 2016 17:00:59 %S A179016 0,1,3,4,7,8,11,15,16,19,23,26,31,32,35,39,42,46,49,53,57,63,64,67,71, %T A179016 74,78,81,85,89,94,97,101,104,109,112,116,120,127,128,131,135,138,142, %U A179016 145,149,153,158,161,165,168,173,176,180,184,190,193,197,200,205,209 %N A179016 The infinite trunk of binary beanstalk: The only infinite sequence such that a(n-1) = a(n) - number of 1's in binary representation of a(n). %C A179016 a(n) tells in what number we end in n steps, when we start climbing up the infinite trunk of the "binary beanstalk" from its root (zero). The name "beanstalk" is due to _Antti Karttunen_. %C A179016 There are many finite sequences such as 0,1,2; 0,1,3,4,7,9; etc. obeying the same condition (see A218254) and as the length increases, so (necessarily) does the similarity to this infinite sequence. %H A179016 Alois P. Heinz and Antti Karttunen, <a href="/A179016/b179016.txt">Table of n, a(n) for n = 0..16405</a> (first 1000 terms from Alois P. Heinz) %H A179016 Paul Tek, <a href="/A179016/a179016.png">Illustration of the first terms</a> %F A179016 a(0)=0, a(1)=1, and for n > 1, if n = A218600(A213711(n)) then a(n) = (2^A213711(n)) - 1, and in other cases, a(n) = a(n+1) - A213712(n+1). (This formula is based on Carl White's observation that this iterated/converging path must pass through each (2^n)-1. However, it would be very interesting to know whether the sequence admits more traditional recurrence(s), referring to previous, not to further terms in the sequence in their definition!) - _Antti Karttunen_, Oct 26 2012 %F A179016 a(n) = A218616(A218602(n)). - _Antti Karttunen_, Mar 04 2013 %F A179016 a(n) = A054429(A233271(A218602(n))). - _Antti Karttunen_, Dec 12 2013 %t A179016 TakeWhile[Reverse@ NestWhileList[# - DigitCount[#, 2, 1] &, 10^3, # > 0 &], # <= 209 &] (* _Michael De Vlieger_, Sep 12 2016 *) %o A179016 (Scheme with _Antti Karttunen_'s Intseq-library for memoizing macro definec): %o A179016 (definec (A179016 n) (cond ((< n 2) n) ((= (A218600 (A213711 n)) n) (- (expt 2 (A213711 n)) 1)) (else (- (A179016 (+ n 1)) (A213712 (+ n 1)))))) ;; _Antti Karttunen_, Nov 05 2012 %o A179016 ;; Alternatively: %o A179016 (define (A179016 n) (A054429 (A233271 (A218602 n)))) ;; _Antti Karttunen_, Dec 12 2013 %Y A179016 Cf. A000120, A010062, A011371, A213710, A213711, A213717, A213730, A213731, A218600, A218616, A218789, A233271, A218602, A054429. First differences: A213712, complement: A213713. %Y A179016 A subsequence of A005187, i.e., a(n) = A005187(A213715(n)). For all n, %Y A179016 A071542(a(n)) = n, and furthermore A213708(n) <= a(n) <= A173601(n). (Cf. A218603, A218604). %Y A179016 Rows of A218254, when reversed, converge towards this sequence. %Y A179016 Cf. A276623, A219648, A219666, A255056, A276573, A276583, A276613 for analogous constructions, and also A259934. %K A179016 easy,nice,nonn,base %O A179016 0,3 %A A179016 _Carl R. White_, Jun 24 2010 %E A179016 Starting offset changed from 1 to 0 by _Antti Karttunen_, Nov 05 2012