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.

Showing 1-4 of 4 results.

A161603 Odd terms of sequence A161602.

Original entry on oeis.org

13, 25, 29, 41, 49, 53, 57, 59, 61, 81, 89, 97, 101, 105, 109, 113, 115, 117, 121, 123, 125, 145, 161, 169, 177, 181, 185, 193, 197, 201, 205, 209, 211, 213, 217, 221, 225, 227, 229, 233, 235, 237, 241, 243, 245, 247, 249, 251, 253, 289, 305
Offset: 1

Views

Author

Leroy Quet, Jun 14 2009

Keywords

Examples

			29 in binary is 11101. Its digital reversal is 10111, which is 23 in decimal. Since 29 > 23, and since 29 is odd, 29 is in this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1,311,2],#>FromDigits[Reverse[IntegerDigits[#,2]],2]&] (* Harvey P. Dale, Feb 20 2013 *)
  • Python
    from itertools import count, islice
    def A161603_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:n>int(bin(n)[-1:1:-1],2),count(max(startvalue|1,1),2))
    A161603_list = list(islice(A161603_gen(),20)) # Chai Wah Wu, Jan 19 2023

Extensions

More terms from Max Alekseyev, Dec 10 2011

A071590 Numbers k such that reversal(k) < k.

Original entry on oeis.org

10, 20, 21, 30, 31, 32, 40, 41, 42, 43, 50, 51, 52, 53, 54, 60, 61, 62, 63, 64, 65, 70, 71, 72, 73, 74, 75, 76, 80, 81, 82, 83, 84, 85, 86, 87, 90, 91, 92, 93, 94, 95, 96, 97, 98, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190, 200, 201, 210, 211, 220, 221, 230, 231
Offset: 1

Views

Author

Benoit Cloitre, Jun 01 2002

Keywords

Crossrefs

Cf. A004086 (digit reversal), A071589 (reversal(k) > k), A002113 (reversal(k) = k).
Cf. A161602 (binary reversal(k) < k).

Programs

  • Mathematica
    Select[Range[300], # > FromDigits[Reverse[IntegerDigits[#]]] &] (* T. D. Noe, Mar 14 2012 *)
    Select[Range[300],IntegerReverse[#]<#&] (* Harvey P. Dale, Jan 16 2022 *)
  • PARI
    for(i=2,300,n=(i); s=ceil(log(n)/log(10)); if((sum(i=0,s,10^(s-i-1)*(floor(n/10^i*1.)-10*floor(n/10^(i+1)*1.))))
    				
  • PARI
    is(n) = {fromdigits(Vecrev(digits(n)))David A. Corneth, Apr 07 2021
    
  • Python
    def ok(n): return int(str(n)[::-1]) < n
    print([k for k in range(232) if ok(k)]) # Michael S. Branicky, Oct 20 2021

Extensions

Definition corrected by Harvey P. Dale, Jan 16 2022

A161601 Positive integers k that are less than the value of the reversal of k's representation in binary.

Original entry on oeis.org

11, 19, 23, 35, 37, 39, 43, 47, 55, 67, 69, 71, 75, 77, 79, 83, 87, 91, 95, 103, 111, 131, 133, 135, 137, 139, 141, 143, 147, 149, 151, 155, 157, 159, 163, 167, 171, 173, 175, 179, 183, 187, 191, 199, 203, 207, 215, 223, 239, 259, 261, 263, 265, 267, 269, 271
Offset: 1

Views

Author

Leroy Quet, Jun 14 2009

Keywords

Comments

By "reversal" of k's representation in binary, it is meant: write k in binary, reverse the order of its digits, and read the result as a binary value.
This sequence contains only odd integers.

Examples

			37 = 100101_2; its digital reversal is 101001_2 = 41. Since 37 < 41, 37 is in this sequence.
		

Crossrefs

Programs

  • Maple
    a := proc (n) local n2, sz, rv: n2 := convert(n, base, 2): sz := nops(n2): rv := add(n2[j]*2^(sz-j), j = 1 .. sz): if n < rv then n else end if end proc; seq(a(n), n = 1 .. 280); # Emeric Deutsch, Jun 28 2009
  • Mathematica
    Select[Range[300],FromDigits[Reverse[IntegerDigits[#,2]],2]>#&] (* Harvey P. Dale, Mar 19 2016 *)
  • Python
    from itertools import count, islice
    def A161601_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n:nA161601_list = list(islice(A161601_gen(),20)) # Chai Wah Wu, Jan 19 2023

Extensions

Extended by Emeric Deutsch, Jun 28 2009
Edited by Jon E. Schoenfield, Feb 24 2019

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.

Original entry on oeis.org

2, 4, 6, 8, 10, 12, 13, 14, 16, 18, 20, 22, 24, 25, 26, 28, 29, 30, 32, 34, 36, 38, 40, 41, 42, 44, 46, 48, 49, 50, 52, 53, 54, 56, 57, 58, 59, 60, 61, 62, 64, 66, 68, 72, 74, 76, 80, 81, 82, 84, 86, 88, 89, 90, 92, 94, 96, 97, 98, 100, 101, 102, 104, 105, 106
Offset: 1

Views

Author

Gus Wiseman, Jan 18 2023

Keywords

Comments

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.

Examples

			The initial terms, binary expansions, and positions of 1's are:
    2:      10 ~ {2}
    4:     100 ~ {3}
    6:     110 ~ {2,3}
    8:    1000 ~ {4}
   10:    1010 ~ {2,4}
   12:    1100 ~ {3,4}
   13:    1101 ~ {1,3,4}
   14:    1110 ~ {2,3,4}
   16:   10000 ~ {5}
   18:   10010 ~ {2,5}
   20:   10100 ~ {3,5}
   22:   10110 ~ {2,3,5}
   24:   11000 ~ {4,5}
   25:   11001 ~ {1,4,5}
   26:   11010 ~ {2,4,5}
   28:   11100 ~ {3,4,5}
   29:   11101 ~ {1,3,4,5}
   30:   11110 ~ {2,3,4,5}
		

Crossrefs

The opposite version is A359401.
Indices of negative terms in A359495; indices of 0's are A359402.
A030190 gives binary expansion, reverse A030308.
A070939 counts binary digits.
A230877 adds up positions of 1's in binary expansion, reverse A029931.
A326669 lists numbers with integer mean position of a 1 in binary expansion.
A358194 counts partitions by sum of partial sums, compositions A053632.

Programs

  • Mathematica
    Select[Range[100],Total[Accumulate[IntegerDigits[#,2]]]>Total[Accumulate[Reverse[IntegerDigits[#,2]]]]&]

Formula

A230877(a(n)) < A029931(a(n)).
Showing 1-4 of 4 results.