cp's OEIS Frontend

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.

A257509 Numbers n for which A257265(n) = 2; numbers for which the nearest descendant leaf in the binary beanstalk is two edges away.

This page as a plain text file.
%I A257509 #15 May 06 2015 17:46:00
%S A257509 0,8,16,19,32,35,42,53,64,67,74,85,89,101,109,112,128,131,138,149,153,
%T A257509 165,173,176,184,197,205,208,221,224,231,240,256,259,266,277,281,293,
%U A257509 301,304,312,325,333,336,349,352,359,368,375,389,397,400,413,416,423,432,445,448,455,464,470,480,487,492,512
%N A257509 Numbers n for which A257265(n) = 2; numbers for which the nearest descendant leaf in the binary beanstalk is two edges away.
%C A257509 Numbers n for which A257265(n) = 2.
%H A257509 Antti Karttunen, <a href="/A257509/b257509.txt">Table of n, a(n) for n = 1..16385</a>
%H A257509 Paul Tek, <a href="/A179016/a179016.png">Illustration of how natural numbers in range 0 .. 133 are organized as a binary tree in the binary beanstalk</a>
%e A257509 8 is present, because 12, 13 and 14 are the three leaves (terms of A055938) nearest to 8, and A011371(12) = A011371(13) = 10, A011371(14) = 11, A011371(10) = A011371(11) = 8 (thus it takes two iterations of A011371 to reach 8 from any of those three leaves). See also Paul Tek's illustration.
%o A257509 (Scheme, with _Antti Karttunen_'s IntSeq-library)
%o A257509 (define A257509 (MATCHING-POS 1 0 (lambda (n) (= 2 (A257265 n)))))
%o A257509 (Haskell)
%o A257509 a257509 n = a257509_list !! (n-1)
%o A257509 a257509_list = filter ((== 2) . a257265) [0..]
%o A257509 -- _Reinhard Zumkeller_, May 06 2015
%Y A257509 First differences: A256489.
%Y A257509 Positions of 2's in A257265.
%Y A257509 Subsequence of A005187.
%Y A257509 Cf. A011371, A055938, A257508, A257264.
%K A257509 nonn
%O A257509 1,2
%A A257509 _Antti Karttunen_, May 03 2015