login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A228071 Write n in binary and interpret as a decimal number; a(n) is this quantity minus n. 2
0, 0, 8, 8, 96, 96, 104, 104, 992, 992, 1000, 1000, 1088, 1088, 1096, 1096, 9984, 9984, 9992, 9992, 10080, 10080, 10088, 10088, 10976, 10976, 10984, 10984, 11072, 11072, 11080, 11080, 99968, 99968, 99976, 99976, 100064, 100064, 100072, 100072, 100960, 100960 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
Difference between decimal and binary numbers written the same.
LINKS
Charles R Greathouse IV, Table of n, a(n) for n = 0..10000
FORMULA
a(n) ~ A007088(n). - Charles R Greathouse IV, Aug 09 2013
a(2^n + r) = a(2^n) + a(r) for 1 <= r <= 2^n - 1. - Peter Bala, Aug 12 2013
a(n) = A007088(n) - n. - Omar E. Pol, Aug 27 2013
EXAMPLE
5 in binary is written 101, so a(5) = 101-5 = 96.
MATHEMATICA
Table[d = IntegerDigits[n, 2]; FromDigits[d, 10] - n, {n, 50}] (* T. D. Noe, Aug 08 2013 *)
PROG
(PARI) a(n)=subst(Pol(binary(n)), 'x, 10)-n \\ Charles R Greathouse IV, Aug 09 2013
(Magma) [Seqint(Intseq((n), 2))-n: n in [0..50]]; // Vincenzo Librandi, Feb 20 2016
CROSSREFS
Sequence in context: A298962 A082798 A286068 * A192386 A119932 A270118
KEYWORD
nonn,base,easy
AUTHOR
André Engels, Aug 08 2013
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 29 07:27 EDT 2024. Contains 371265 sequences. (Running on oeis4.)