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.

A038453 Sums of 11 distinct powers of 10.

Original entry on oeis.org

11111111111, 101111111111, 110111111111, 111011111111, 111101111111, 111110111111, 111111011111, 111111101111, 111111110111, 111111111011, 111111111101, 111111111110, 1001111111111, 1010111111111, 1011011111111, 1011101111111, 1011110111111, 1011111011111, 1011111101111
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Union[Total/@Subsets[10^Range[0,12],{11}]] (* Harvey P. Dale, Jan 20 2013 *)
  • PARI
    lista(nn) = {for (n=1, nn, if (hammingweight(n) == 11, print1(subst(Pol(binary(n)), x, 10), ", ");););} \\ Michel Marcus, Feb 29 2016
    
  • Python
    from itertools import islice
    def A038453_gen(): # generator of terms
        yield int(bin(n:=2047)[2:])
        while True: yield int(bin((n:=n^((a:=-n&n+1)|(a>>1)) if n&1 else ((n&~(b:=n+(a:=n&-n)))>>a.bit_length())^b))[2:])
    A038453_list = list(islice(A038453_gen(),20)) # Chai Wah Wu, Mar 11 2025

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016