|
|
A007088
|
|
The binary numbers (or binary words, or binary vectors, or binary expansion of n): numbers written in base 2.
(Formerly M4679)
|
|
723
|
|
|
0, 1, 10, 11, 100, 101, 110, 111, 1000, 1001, 1010, 1011, 1100, 1101, 1110, 1111, 10000, 10001, 10010, 10011, 10100, 10101, 10110, 10111, 11000, 11001, 11010, 11011, 11100, 11101, 11110, 11111, 100000, 100001, 100010, 100011, 100100, 100101, 100110, 100111
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
COMMENTS
|
List of binary numbers. (This comment is to assist people searching for that particular phrase. - N. J. A. Sloane, Apr 08 2016)
Or, numbers that are sums of distinct powers of 10.
Or, numbers having only digits 0 and 1 in their decimal representation.
Nonnegative integers with no decimal digit > 1.
Thus nonnegative integers n in base 10 such that kn can be calculated by normal addition (i.e., n + n + ... + n, with k n's (but not necessarily k + k + ... + k, with n k's)) or multiplication without requiring any carry operations for 0 <= k <= 9. (End)
For any integer n>=0, find the binary representation and then interpret as decimal representation giving a(n). - Michael Somos, Nov 15 2015
|
|
REFERENCES
|
Heinz Gumin, "Herrn von Leibniz' 'Rechnung mit Null und Eins'", Siemens AG, 3. Auflage 1979 -- contains facsimiles of Leibniz's papers from 1679 and 1703.
Manfred R. Schroeder, "Fractals, Chaos, Power Laws", W. H. Freeman, 1991, p. 383.
N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = Sum_{i=0..m} d(i)*10^i, where Sum_{i=0..m} d(i)*2^i is the base 2 representation of n.
a(n) = (1/2)*Sum_{i>=0} (1-(-1)^floor(n/2^i))*10^i. - Benoit Cloitre, Nov 20 2001
a(2n) = 10*a(n), a(2n+1) = a(2n)+1.
G.f.: 1/(1-x) * Sum_{k>=0} 10^k * x^(2^k)/(1+x^(2^k)) - for sequence as decimal integers. - Franklin T. Adams-Watters, Jun 16 2006
|
|
EXAMPLE
|
a(6)=110 because (1/2)*((1-(-1)^6)*10^0 + (1-(-1)^3)*10^1 + (1-(-1)^1)*10^2) = 10 + 100.
G.f. = x + 10*x^2 + 11*x^3 + 100*x^4 + 101*x^5 + 110*x^6 + 111*x^7 + 1000*x^8 + ...
|
|
MAPLE
|
|
|
MATHEMATICA
|
Table[ FromDigits[ IntegerDigits[n, 2]], {n, 0, 39}]
|
|
PROG
|
(PARI) {a(n) = subst( Pol( binary(n)), x, 10)}; /* Michael Somos, Jun 07 2002 */
(PARI) {a(n) = if( n<=0, 0, n%2 + 10*a(n\2))}; /* Michael Somos, Jun 07 2002 */
(Haskell)
a007088 0 = 0
a007088 n = 10 * a007088 n' + m where (n', m) = divMod n 2
(Python)
def a(n): return int(bin(n)[2:])
|
|
CROSSREFS
|
Cf. A028897 (convert binary to decimal).
Cf. A000042, A007089-A007095, A000695, A005836, A033042-A033052, A159918, A004290, A169965, A169966, A169967, A169964, A204093, A204094, A204095, A097256, A257773, A257770.
|
|
KEYWORD
|
nonn,base,nice,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|