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-2 of 2 results.

A062880 Zero together with the numbers which can be written as a sum of distinct odd powers of 2.

Original entry on oeis.org

0, 2, 8, 10, 32, 34, 40, 42, 128, 130, 136, 138, 160, 162, 168, 170, 512, 514, 520, 522, 544, 546, 552, 554, 640, 642, 648, 650, 672, 674, 680, 682, 2048, 2050, 2056, 2058, 2080, 2082, 2088, 2090, 2176, 2178, 2184, 2186, 2208, 2210, 2216, 2218, 2560, 2562
Offset: 0

Views

Author

Antti Karttunen, Jun 26 2001

Keywords

Comments

Binary expansion of n does not contain 1-bits at even positions.
Integers whose base-4 representation consists of only 0's and 2's.
Every nonnegative even number is a unique sum of the form a(k)+2*a(l); moreover, this sequence is unique with such property. - Vladimir Shevelev, Nov 07 2008
Also numbers such that the digital sum base 2 and the digital sum base 4 are in a ratio of 2:4. - Michel Marcus, Sep 23 2013
From Gus Wiseman, Jun 10 2020: (Start)
Numbers k such that the k-th composition in standard order has all even parts. The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. For example, the sequence of all compositions into even parts begins:
0: () 520: (6,4) 2080: (6,6)
2: (2) 522: (6,2,2) 2082: (6,4,2)
8: (4) 544: (4,6) 2088: (6,2,4)
10: (2,2) 546: (4,4,2) 2090: (6,2,2,2)
32: (6) 552: (4,2,4) 2176: (4,8)
34: (4,2) 554: (4,2,2,2) 2178: (4,6,2)
40: (2,4) 640: (2,8) 2184: (4,4,4)
42: (2,2,2) 642: (2,6,2) 2186: (4,4,2,2)
128: (8) 648: (2,4,4) 2208: (4,2,6)
130: (6,2) 650: (2,4,2,2) 2210: (4,2,4,2)
136: (4,4) 672: (2,2,6) 2216: (4,2,2,4)
138: (4,2,2) 674: (2,2,4,2) 2218: (4,2,2,2,2)
160: (2,6) 680: (2,2,2,4) 2560: (2,10)
162: (2,4,2) 682: (2,2,2,2,2) 2562: (2,8,2)
168: (2,2,4) 2048: (12) 2568: (2,6,4)
170: (2,2,2,2) 2050: (10,2) 2570: (2,6,2,2)
512: (10) 2056: (8,4) 2592: (2,4,6)
514: (8,2) 2058: (8,2,2) 2594: (2,4,4,2)
(End)

Crossrefs

Cf. A000695.
Except for first term, n such that A063694(n) = 0. Binary expansion is given in A062033.
Interpreted as Zeckendorf expansion: A062879.
Central diagonal of arrays A163357 and A163359.
Even partitions are counted by A035363.
Numbers with an even number of 1's in binary expansion are A001969.
Numbers whose binary expansion has even length are A053754.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Compositions without even parts are A060142.
- Sum is A070939.
- Product is A124758.
- Strict compositions are A233564.
- Heinz number is A333219.
- Number of distinct parts is A334028.

Programs

  • C
    uint32_t a_next(uint32_t a_n) { return (a_n + 0x55555556) & 0xaaaaaaaa; } /* Falk Hüffner, Jan 22 2022 */
    
  • Haskell
    a062880 n = a062880_list !! n
    a062880_list = filter f [0..] where
       f 0 = True
       f x = (m == 0 || m == 2) && f x'  where (x', m) = divMod x 4
    -- Reinhard Zumkeller, Nov 20 2012
    
  • Maple
    [seq(a(j),j=0..100)]; a := n -> add((floor(n/(2^i)) mod 2)*(2^((2*i)+1)),i=0..floor_log_2(n+1));
  • Mathematica
    b[n_] := BitAnd[n, Sum[2^k, {k, 0, Log[2, n] // Floor, 2}]]; Select[Range[ 0, 10^4], b[#] == 0&] (* Jean-François Alcover, Feb 28 2016 *)
  • Python
    def A062880(n): return int(bin(n)[2:],4)<<1 # Chai Wah Wu, Aug 21 2023

Formula

a(n) = 2 * A000695(n). - Vladimir Shevelev, Nov 07 2008
From Robert Israel, Apr 10 2018: (Start)
a(2*n) = 4*a(n).
a(2*n+1) = 4*a(n)+2.
G.f. g(x) satisfies: g(x) = 4*(1+x)*g(x^2)+2*x/(1-x^2). (End)

A063010 Carryless binary square of n; also Moser-de Bruijn sequence written in binary.

Original entry on oeis.org

0, 1, 100, 101, 10000, 10001, 10100, 10101, 1000000, 1000001, 1000100, 1000101, 1010000, 1010001, 1010100, 1010101, 100000000, 100000001, 100000100, 100000101, 100010000, 100010001, 100010100, 100010101, 101000000, 101000001
Offset: 0

Views

Author

Henry Bottomley, Jul 03 2001

Keywords

Comments

Numbers that are sums of distinct powers of 100. - David Wasserman, Feb 26 2008

Examples

			a(11)=1000101, since 11 in binary is 1011 and binary carryless sum of 1011000, 0, 10110 and 1011 is 1000101.
		

Crossrefs

Cf. Moser-de Bruijn sequence A000695, carryless decimal squares A059729, pre-carry binary squares A063009.

Programs

  • Mathematica
    With[{k = 100}, Map[FromDigits[#, k] &, Tuples[{0, 1}, 5]]] (* Michael De Vlieger, Oct 29 2022 *)
  • PARI
    a(n) = fromdigits(binary(n),100); \\ Ruud H.G. van Tol, Dec 05 2022
    
  • Python
    def A063010(n): return int(bin(int(bin(n)[2:],4))[2:]) # Chai Wah Wu, Apr 09 2025

Formula

a(n) = A062033(n)/10, i.e., with final zero removed.
a(n) = Sum_{k>=0} A030308(n,k)*A098608(k). - Philippe Deléham, Oct 15 2011
G.f.: (1/(1 - x))*Sum_{k>=0} 100^k*x^(2^k)/(1 + x^(2^k)). - Ilya Gutkovskiy, Jun 04 2017

Extensions

More terms from David Wasserman, Feb 26 2008
Showing 1-2 of 2 results.