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.

A359496 Nonnegative integers whose sum of positions of 1's in their binary expansion is less than the sum of positions of 1's in their reversed binary expansion, where positions in a sequence are read starting with 1 from the left.

This page as a plain text file.
%I A359496 #12 Mar 07 2023 19:04:19
%S A359496 2,4,6,8,10,12,13,14,16,18,20,22,24,25,26,28,29,30,32,34,36,38,40,41,
%T A359496 42,44,46,48,49,50,52,53,54,56,57,58,59,60,61,62,64,66,68,72,74,76,80,
%U A359496 81,82,84,86,88,89,90,92,94,96,97,98,100,101,102,104,105,106
%N A359496 Nonnegative integers whose sum of positions of 1's in their binary expansion is less than the sum of positions of 1's in their reversed binary expansion, where positions in a sequence are read starting with 1 from the left.
%C A359496 First differs from A161602 in lacking 70, with binary expansion (1,0,0,0,1,1,0), positions of 1's 1 + 5 + 6 = 12, reversed 2 + 3 + 7 = 12.
%F A359496 A230877(a(n)) < A029931(a(n)).
%e A359496 The initial terms, binary expansions, and positions of 1's are:
%e A359496     2:      10 ~ {2}
%e A359496     4:     100 ~ {3}
%e A359496     6:     110 ~ {2,3}
%e A359496     8:    1000 ~ {4}
%e A359496    10:    1010 ~ {2,4}
%e A359496    12:    1100 ~ {3,4}
%e A359496    13:    1101 ~ {1,3,4}
%e A359496    14:    1110 ~ {2,3,4}
%e A359496    16:   10000 ~ {5}
%e A359496    18:   10010 ~ {2,5}
%e A359496    20:   10100 ~ {3,5}
%e A359496    22:   10110 ~ {2,3,5}
%e A359496    24:   11000 ~ {4,5}
%e A359496    25:   11001 ~ {1,4,5}
%e A359496    26:   11010 ~ {2,4,5}
%e A359496    28:   11100 ~ {3,4,5}
%e A359496    29:   11101 ~ {1,3,4,5}
%e A359496    30:   11110 ~ {2,3,4,5}
%t A359496 Select[Range[100],Total[Accumulate[IntegerDigits[#,2]]]>Total[Accumulate[Reverse[IntegerDigits[#,2]]]]&]
%o A359496 (Python 3.10+)
%o A359496 from itertools import count, islice
%o A359496 def A359496_gen(startvalue=0): # generator of terms >= startvalue
%o A359496     return filter(lambda n:sum(i for i, j in enumerate(bin(n)[2:]) if j=='1')<<1 < n.bit_count()*(n.bit_length()-1), count(max(startvalue,0)))
%o A359496 A359496_list = list(islice(A359496_gen(),20)) # _Chai Wah Wu_, Jan 19 2023
%Y A359496 The opposite version is A359401.
%Y A359496 Indices of negative terms in A359495; indices of 0's are A359402.
%Y A359496 A030190 gives binary expansion, reverse A030308.
%Y A359496 A070939 counts binary digits.
%Y A359496 A230877 adds up positions of 1's in binary expansion, reverse A029931.
%Y A359496 A326669 lists numbers with integer mean position of a 1 in binary expansion.
%Y A359496 A358194 counts partitions by sum of partial sums, compositions A053632.
%Y A359496 Cf. A000120, A048793, A051293, A222955, A231204, A291166, A304818, A326672, A326673, A359043.
%K A359496 nonn,base
%O A359496 1,1
%A A359496 _Gus Wiseman_, Jan 18 2023