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.

A038447 Sums of 5 distinct powers of 10.

Original entry on oeis.org

11111, 101111, 110111, 111011, 111101, 111110, 1001111, 1010111, 1011011, 1011101, 1011110, 1100111, 1101011, 1101101, 1101110, 1110011, 1110101, 1110110, 1111001, 1111010, 1111100, 10001111, 10010111, 10011011, 10011101
Offset: 1

Views

Author

Keywords

Comments

From Joshua S.M. Weiner, Oct 18 2012: (Start)
It is also the "energy state" of 5 quantum (objects) in "siteswap" juggling patterns.
This is also the binary representation of nC5 for n = 5 to infinity.
A siteswap example: 85525.
a(n) = [decimal] = [binary] = transition notes.
a(1) = [31] = 11111 = the ground state "5" throw.
a(22) = [143] = 1001111 = can be reached from a(1) with an "8" throw.
a(12) = [103] = 110111 = can be reached from a(22) with a "5" throw.
a(4) = [55] = 111011 = can be reached from a(12) with a "5" throw.
a(1) = [31] = 11111 = can be reached from a(4) with a "2".
a(1) = [31] = 11111 = can be repeated from a(1) with a "5" throw.
(End)

Examples

			From _Joshua S.M. Weiner_, Oct 18 2012: (Start)
a(1) = 11111
a(2) = 101111 (begins 6C5 nodes)
a(3) = 110111
a(4) = 111011
a(5) = 111101
a(6) = 111110
a(7) = 1001111 (begins 7C5 nodes)
(End)
		

Crossrefs

Cf. A011557, A014313 (decimal version).

Programs

  • Haskell
    import Data.Set (fromList, deleteFindMin, union)
    a038447 n = a038447_list !! (n-1)
    a038447_list = f $ fromList [11111] where
       f s = m : f (union s' $ fromList $ g [] $ show m) where
            (m, s') = deleteFindMin s
       g _  []       = []
       g us ('0':vs) = g (us ++ ['0']) vs
       g us ('1':vs) = (read (us ++ "10" ++ vs)) : g (us ++ ['1']) vs
    -- Reinhard Zumkeller, Jan 06 2015
    
  • Mathematica
    t = Select[Range[200], Total[IntegerDigits[#, 2]] == 5 &]; FromDigits /@ IntegerDigits[t, 2] (* T. D. Noe, Oct 19 2012 *)
  • Python
    from itertools import islice
    def A038447_gen(): # generator of terms
        yield int(bin(n:=31)[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:])
    A038447_list = list(islice(A038447_gen(),20)) # Chai Wah Wu, Mar 11 2025