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.

Showing 1-4 of 4 results.

A089600 Another lazy binary representation of n: similar to A089591 except that the single carry is performed before the increment instead of after.

Original entry on oeis.org

0, 1, 2, 11, 12, 21, 102, 111, 112, 121, 202, 211, 1012, 1021, 1102, 1111, 1112, 1121, 1202, 1211, 2012, 2021, 2102, 2111, 10112, 10121, 10202, 10211, 11012, 11021, 11102, 11111, 11112, 11121, 11202, 11211, 12012, 12021, 12102, 12111, 20112
Offset: 0

Views

Author

Jeff Erickson, Dec 31 2003

Keywords

Programs

  • Maple
    A089591 := proc(n) option remember ; local nhalf ; if n <= 1 then RETURN(n) ; else nhalf := floor(n/2) ; if n mod 2 = 1 then RETURN(10*A089591(nhalf) +1) ; else RETURN(10*(A089591(nhalf-1)+1)) ; fi ; fi ; end: A089600 := proc(n) option remember ; local nhalf ; nhalf := floor(n/2) ; if n <= 1 then RETURN(n) ; else if n mod 2 = 1 then RETURN(10*A089600(nhalf) +1) ; else RETURN(10*A089591(nhalf-1)+2) ; fi ; fi ; end: for n from 0 to 200 do printf("%d, ",A089600(n)) ; od ; # R. J. Mathar, Mar 11 2007

Formula

Let b(n) = A089591(n). Then a(0) = b(0) = 0; b(n) = if n is odd then b((n-1)/2):1 else a(n/2):0; a(n) = if n is odd then a((n-1)/2):1 else b(n/2-1):2.

Extensions

More terms from R. J. Mathar, Mar 11 2007

A089601 Interleaving of A089591 and A089600.

Original entry on oeis.org

0, 0, 1, 1, 2, 10, 11, 11, 12, 20, 21, 101, 102, 110, 111, 111, 112, 120, 121, 201, 202, 210, 211, 1011, 1012, 1020, 1021, 1101, 1102, 1110, 1111, 1111, 1112, 1120, 1121, 1201, 1202, 1210, 1211, 2011, 2012, 2020, 2021, 2101, 2102, 2110, 2111, 10111
Offset: 0

Views

Author

Jeff Erickson, Dec 31 2003

Keywords

Crossrefs

Programs

  • Maple
    A089591 := proc(n) option remember ; local nhalf ; if n <= 1 then RETURN(n) ; else nhalf := floor(n/2) ; if n mod 2 = 1 then RETURN(10*A089591(nhalf) +1) ; else RETURN(10*(A089591(nhalf-1)+1)) ; fi ; fi ; end: A089600 := proc(n) option remember ; local nhalf ; nhalf := floor(n/2) ; if n <= 1 then RETURN(n) ; else if n mod 2 = 1 then RETURN(10*A089600(nhalf) +1) ; else RETURN(10*A089591(nhalf-1)+2) ; fi ; fi ; end: A089601 := proc(n) if n mod 2 = 0 then A089600(n/2) ; else A089591((n-1)/2) ; fi ; end: seq(A089601(n),n=0..80) ; # R. J. Mathar, Jul 20 2007

Formula

To get a(n), drop last digit from either A089591(n) or A089600(n+1).

Extensions

More terms from R. J. Mathar, Jul 20 2007

A137951 Redundant binary representation (A089591) of n interpreted as ternary number.

Original entry on oeis.org

0, 1, 3, 4, 6, 10, 12, 13, 15, 19, 21, 31, 33, 37, 39, 40, 42, 46, 48, 58, 60, 64, 66, 94, 96, 100, 102, 112, 114, 118, 120, 121, 123, 127, 129, 139, 141, 145, 147, 175, 177, 181, 183, 193, 195, 199, 201, 283, 285, 289, 291, 301, 303, 307, 309, 337, 339, 343, 345
Offset: 0

Views

Author

Reinhard Zumkeller, Feb 25 2008

Keywords

Comments

A007089(a(n)) = A089591(n).

Examples

			A089591(10)=210 --> a(10)=2*3^2+1*3^1+0*3^0=18+3+0=21;
A089591(11)=1011 --> a(11)=1*3^3+0*3^2+1*3^1+1*3^0=27+0+3+1=31.
		

A089604 "3-lazy binary" representation of n: to increment, add one to the last digit, then "carry" the rightmost 3 (replace 03->11, 13->21, or 23->31).

Original entry on oeis.org

0, 1, 2, 11, 12, 21, 22, 31, 112, 121, 122, 131, 212, 213, 222, 231, 312, 321, 1122, 1131, 1212, 1221, 1222, 1231, 1312, 1321, 2122, 2131, 2212, 2221, 2222, 2231, 2312, 2321, 3122, 3131, 3212, 3221, 11222
Offset: 0

Views

Author

Jeff Erickson, Dec 31 2003

Keywords

Comments

Obvious generalization of A089591 and A089600.

Extensions

Edited by Charles R Greathouse IV, Aug 03 2010
Showing 1-4 of 4 results.