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-2 of 2 results.

A118240 The part of n in base phi left of the decimal using a least-greedy algorithm representation.

Original entry on oeis.org

0, 1, 1, 10, 11, 101, 111, 1010, 1011, 1101, 1110, 1111, 10101, 10111, 11010, 11011, 11101, 11111, 101010, 101011, 101101, 101110, 101111, 110101, 110111, 111010, 111011, 111101, 111110, 111111, 1010101, 1010111, 1011010, 1011011, 1011101
Offset: 0

Views

Author

Graeme McRae, Apr 17 2006

Keywords

Comments

Uses least-greedy algorithm (start with largest possible power of phi, writing a 1 only when required, then work downward).
a(n) is also the left portion of the base-phi representation of n in Knott's representation which uses the least number of 0's, the most 1's, and in which the right-hand portion (see A362919) is finite. - N. J. A. Sloane, May 27 2023

Examples

			6 = 111.01101010... in base phi using the least-greedy algorithm. The part to the left of the decimal is a(6) = 111.
		

Crossrefs

Programs

  • Pseudocode
    constant (float): phi=(sqrt(5)+1)/2;
    variable (float): lphi=phi^floor[log(n)/log(phi)];
    variable (float): rem=n;
    variable (integer): count=0;
    loop: while lphi>1 {count=count*10; lphi=lphi/phi; if(rem > lphi*phi) { rem=rem-lphi; count++;}}

Extensions

a(1) corrected by N. J. A. Sloane, May 27 2023

A362919 a(n) is the right portion (reversed) of the base-phi representation of n in Knott's representation which uses the least number of 0's, the most 1's, and in which the right-hand portion is finite.

Original entry on oeis.org

0, 0, 11, 1111, 1111, 1111, 1110, 111101, 111101, 111101, 111111, 111111, 111111, 111110, 111011, 111011, 111011, 111010, 11110101, 11110101, 11110101, 11110111, 11110111, 11110111, 11110110, 11111101, 11111101, 11111101, 11111111, 11111111, 11111111
Offset: 0

Views

Author

N. J. A. Sloane, May 27 2023

Keywords

Comments

The left portion is given in A118240.

Examples

			The representations of the numbers 0 though 30 are:
  0 = 0.0
  1 = 1.0
  2 = 1.11
  3 = 10.1111
  4 = 11.1111
  5 = 101.1111
  6 = 111.0111
  7 = 1010.101111
  8 = 1011.101111
  9 = 1101.101111
  10 = 1110.111111
  11 = 1111.111111
  12 = 10101.111111
  13 = 10111.011111
  14 = 11010.110111
  15 = 11011.110111
  16 = 11101.110111
  17 = 11111.010111
  18 = 101010.10101111
  19 = 101011.10101111
  20 = 101101.10101111
  21 = 101110.11101111
  22 = 101111.11101111
  23 = 110101.11101111
  24 = 110111.01101111
  25 = 111010.10111111
  26 = 111011.10111111
  27 = 111101.10111111
  28 = 111110.11111111
  29 = 111111.11111111
  30 = 1010101.11111111
		

Crossrefs

Showing 1-2 of 2 results.