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.

This page as a plain text file.
%I A038447 #22 Mar 11 2025 09:44:51
%S A038447 11111,101111,110111,111011,111101,111110,1001111,1010111,1011011,
%T A038447 1011101,1011110,1100111,1101011,1101101,1101110,1110011,1110101,
%U A038447 1110110,1111001,1111010,1111100,10001111,10010111,10011011,10011101
%N A038447 Sums of 5 distinct powers of 10.
%C A038447 From _Joshua S.M. Weiner_, Oct 18 2012: (Start)
%C A038447 It is also the "energy state" of 5 quantum (objects) in "siteswap" juggling patterns.
%C A038447 This is also the binary representation of nC5 for n = 5 to infinity.
%C A038447 A siteswap example: 85525.
%C A038447 a(n) = [decimal] = [binary] = transition notes.
%C A038447 a(1) = [31] = 11111 = the ground state "5" throw.
%C A038447 a(22) = [143] = 1001111 = can be reached from a(1) with an "8" throw.
%C A038447 a(12) = [103] = 110111 = can be reached from a(22) with a "5" throw.
%C A038447 a(4) = [55] = 111011 = can be reached from a(12) with a "5" throw.
%C A038447 a(1) = [31] = 11111 = can be reached from a(4) with a "2".
%C A038447 a(1) = [31] = 11111 = can be repeated from a(1) with a "5" throw.
%C A038447 (End)
%H A038447 Reinhard Zumkeller, <a href="/A038447/b038447.txt">Table of n, a(n) for n = 1..10000</a>
%H A038447 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/Siteswap.html">Siteswap</a>
%e A038447 From _Joshua S.M. Weiner_, Oct 18 2012: (Start)
%e A038447 a(1) = 11111
%e A038447 a(2) = 101111 (begins 6C5 nodes)
%e A038447 a(3) = 110111
%e A038447 a(4) = 111011
%e A038447 a(5) = 111101
%e A038447 a(6) = 111110
%e A038447 a(7) = 1001111 (begins 7C5 nodes)
%e A038447 (End)
%t A038447 t = Select[Range[200], Total[IntegerDigits[#, 2]] == 5 &]; FromDigits /@ IntegerDigits[t, 2] (* _T. D. Noe_, Oct 19 2012 *)
%o A038447 (Haskell)
%o A038447 import Data.Set (fromList, deleteFindMin, union)
%o A038447 a038447 n = a038447_list !! (n-1)
%o A038447 a038447_list = f $ fromList [11111] where
%o A038447    f s = m : f (union s' $ fromList $ g [] $ show m) where
%o A038447         (m, s') = deleteFindMin s
%o A038447    g _  []       = []
%o A038447    g us ('0':vs) = g (us ++ ['0']) vs
%o A038447    g us ('1':vs) = (read (us ++ "10" ++ vs)) : g (us ++ ['1']) vs
%o A038447 -- _Reinhard Zumkeller_, Jan 06 2015
%o A038447 (Python)
%o A038447 from itertools import islice
%o A038447 def A038447_gen(): # generator of terms
%o A038447     yield int(bin(n:=31)[2:])
%o A038447     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:])
%o A038447 A038447_list = list(islice(A038447_gen(),20)) # _Chai Wah Wu_, Mar 11 2025
%Y A038447 Cf. A011557, A014313 (decimal version).
%K A038447 nonn,easy
%O A038447 1,1
%A A038447 _Olivier Gérard_