login
Next-to-leaf vertices in binary beanstalk; Numbers n for which A257265(n) = 1.
7

%I #16 May 06 2015 17:46:20

%S 1,3,4,7,10,11,15,18,22,23,25,26,31,34,38,39,41,46,47,49,50,54,56,57,

%T 63,66,70,71,73,78,79,81,82,86,88,94,95,97,98,102,104,105,110,113,116,

%U 117,119,120,127,130,134,135,137,142,143,145,146,150,152,158,159,161,162,166,168,169,174,177,180,181

%N Next-to-leaf vertices in binary beanstalk; Numbers n for which A257265(n) = 1.

%C Numbers n for which A257265(n) = 1, in other words, numbers n for which a descendant leaf nearest to n in binary beanstalk is one edge away.

%C Numbers n such that either A079559(A213723(n)) or A079559(A213724(n)) (or both) are zero.

%C Equal to A257507 with duplicate terms removed.

%H Antti Karttunen, <a href="/A257508/b257508.txt">Table of n, a(n) for n = 1..12289</a>

%H 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 3 is present because it has an immediate leaf-child 5, as A011371(5) = 3.

%e 4 is present because it has an immediate leaf-child 6, as A011371(6) = 4.

%e 10 is present because it has two immediate leaf-children, 12 and 13, as A011371(12) = A011371(13) = 10.

%e See also Paul Tek's illustration.

%o (Scheme, with _Antti Karttunen_'s IntSeq-library, two alternatives)

%o (define A257508 (MATCHING-POS 1 0 (lambda (n) (= 1 (A257265 n)))))

%o (define A257508 (MATCHING-POS 1 0 (lambda (n) (or (zero? (A079559 (A213723 n))) (zero? (A079559 (A213724 n))))))) ;; Compare to the definition of A257512.

%o (Haskell)

%o a257508 n = a257508_list !! (n-1)

%o a257508_list = filter ((== 1) . a257265) [0..]

%o -- _Reinhard Zumkeller_, May 06 2015

%Y Positions of 1's in A257265.

%Y Subsequence of A005187.

%Y Cf. A011371, A079559, A213723, A213724, A257507, A257509, A257512 (a subsequence).

%K nonn

%O 1,2

%A _Antti Karttunen_, May 03 2015