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.

A038454 Sums of 12 distinct powers of 10.

Original entry on oeis.org

111111111111, 1011111111111, 1101111111111, 1110111111111, 1111011111111, 1111101111111, 1111110111111, 1111111011111, 1111111101111, 1111111110111, 1111111111011, 1111111111101, 1111111111110, 10011111111111, 10101111111111, 10110111111111, 10111011111111, 10111101111111
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    N:= 14: # to get all terms of at most N digits
    sort(map(t -> (10^N-1)/9 - add(10^j, j=t),
    combinat:-choose([$0..N-1],N-12))); # Robert Israel, Feb 28 2016
  • Mathematica
    Sort[Plus @@@ Subsets[10^Range[0, 12], {12}]] (* Amiram Eldar, Jul 12 2022 *)
  • Python
    from itertools import islice
    def A038454_gen(): # generator of terms
        yield int(bin(n:=4095)[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:])
    A038454_list = list(islice(A038454_gen(),20)) # Chai Wah Wu, Mar 11 2025

Formula

a(binomial(N,12)+k) = 10^N + A038453(k) for 1 <= k <= binomial(N,11). - Robert Israel, Feb 28 2016

Extensions

Offset changed to 1 by Ivan Neretin, Feb 28 2016