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-10 of 16 results. Next

A214974 Numbers k for which A116543(k) = A007895(k); i.e., the Lucas and Zeckendorf representations of k have the same length.

Original entry on oeis.org

1, 2, 3, 6, 9, 10, 14, 15, 17, 22, 27, 28, 36, 38, 41, 43, 44, 46, 52, 58, 59, 61, 62, 66, 69, 74, 75, 81, 84, 94, 95, 96, 98, 107, 112, 114, 117, 119, 120, 122, 128, 131, 136, 139, 148, 152, 153, 154, 155, 159, 161, 164, 173, 175, 176, 181, 182, 184, 185
Offset: 1

Views

Author

Clark Kimberling, Oct 20 2012

Keywords

Examples

			k...Lucas.....Zeckendorf....counter
1...1.........1.............a(1)= 1
2...2.........2.............a(2)= 2
3...3.........3.............a(3)= 3
4...4.........3+1
5...4+1.......5
6...4+2.......5+1...........a(4)= 6
7...7.........5+2
8...7+1.......8
9...7+2.......8+1...........a(5)= 9
		

Crossrefs

Programs

  • Mathematica
    u = Reverse[Sort[Table[LucasL[n - 1], {n, 1, 50}]]];
    u1 = Map[Length[Select[Reap[FoldList[(Sow[Quotient[#1, #2]]; Mod[#1, #2]) &, #, u]][[2,1]], # > 0 &]] &, Range[1000]];
    v = Reverse[Table[Fibonacci[n + 1], {n, 1, 50}]];
    v1 = Map[Length[Select[Reap[FoldList[(Sow[Quotient[#1, #2]]; Mod[#1, #2]) &, #, v]][[2,1]], # > 0 &]] &, Range[1000]];
    s[n_] := If[u1[[n]] == v1[[n]], 1, 0];
    s1 = Table[s[n], {n, 1, 200}];
    f1 = Flatten[Position[s1, 1]] (* A214974 *)
    s[n_] := If[u1[[n]] < v1[[n]], 1, 0];
    s2 = Table[s[n], {n, 1, 200}];
    f2 = Flatten[Position[s2, 1]] (* A214975 *)
    s[n_] := If[u1[[n]] > v1[[n]], 1, 0];
    s3 = Table[s[n], {n, 1, 200}];
    f3 = Flatten[Position[s3, 1]] (* A214976 *)
    (* Peter J. C. Moses *)

A214975 Numbers k for which A116543(k) < A007895(k); i.e., the Lucas representation of k is shorter than the Zeckendorf representation.

Original entry on oeis.org

4, 7, 11, 12, 18, 19, 20, 25, 29, 30, 31, 32, 33, 40, 47, 48, 49, 50, 51, 53, 54, 65, 67, 72, 76, 77, 78, 79, 80, 82, 83, 85, 86, 87, 88, 101, 105, 106, 108, 109, 116, 123, 124, 125, 126, 127, 129, 130, 132, 133, 134, 135, 137, 138, 140, 141, 142, 143, 156
Offset: 1

Views

Author

Clark Kimberling, Oct 20 2012

Keywords

Examples

			k...Lucas.....Zeckendorf....counter
1...1.........1
2...2.........2
3...3.........3
4...4.........3+1...........a(1) = 4
5...4+1.......5
6...4+2.......5+1
7...7.........5+2...........a(2) = 7
8...7+1.......8
9...7+2.......8+1
		

Crossrefs

Programs

A214976 Numbers k for which A116543(k) > A007895(k); i.e., the Lucas representation of k is longer than the Zeckendorf representation.

Original entry on oeis.org

5, 8, 13, 16, 21, 23, 24, 26, 34, 35, 37, 39, 42, 45, 55, 56, 57, 60, 63, 64, 68, 70, 71, 73, 89, 90, 91, 92, 93, 97, 99, 100, 102, 103, 104, 110, 111, 113, 115, 118, 121, 144, 145, 146, 147, 149, 150, 151, 157, 158, 160, 162, 165, 166, 167, 168, 169, 178
Offset: 1

Views

Author

Clark Kimberling, Oct 20 2012

Keywords

Examples

			k...Lucas.....Zeckendorf....counter
1...1.........1
2...2.........2
3...3.........3
4...4.........3+1
5...4+1.......5.............a(1) = 5
6...4+2.......5+1
7...7.........5+2
8...7+1.......8.............a(2) = 8
9...7+2.......8+1
		

Crossrefs

Programs

A130310 Minimal (or "greedy") Lucas representation of n, in which L(0) = 2 and L(2) = 3 are not allowed in the same representation (hence the correct representation of the integer 5 is 1010 rather than 101). A binary system of integers with Lucas numbers (A000032) as a base.

Original entry on oeis.org

0, 10, 1, 100, 1000, 1010, 1001, 10000, 10010, 10001, 10100, 100000, 100010, 100001, 100100, 101000, 101010, 101001, 1000000, 1000010, 1000001, 1000100, 1001000, 1001010, 1001001, 1010000, 1010010, 1010001, 1010100, 10000000, 10000010, 10000001, 10000100, 10001000
Offset: 0

Views

Author

Casey Mongoven, May 21 2007

Keywords

Examples

			a(9) = 10001 because 7 + 2 = 9.
a(10) is 10100 because 7 + 3 = 10.
		

References

  • Richard A. Dunlap, The Golden Ratio and Fibonacci Numbers, Singapore, World Scientific, 1997, pp. 73-77.
  • Edouard Zeckendorf, Représentation des nombres naturels par une somme des nombres de Fibonacci ou de nombres de Lucas, Bull. Soc. Roy. Sci. Liège, Vol. 41 (1972), pp. 179-182.

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{s = {}, m = n, k = 1}, While[m > 0, If[m == 1, k = 1; AppendTo[s, k]; m = 0, If[m == 2, k = 0; AppendTo[s, k]; m = 0, While[LucasL[k] <= m, k++]; k--; AppendTo[s, k]; m -= LucasL[k]; k = 1]]]; FromDigits @ IntegerDigits[Total[2^s], 2]]; Array[a, 30, 0] (* Amiram Eldar, Feb 17 2022 *)

Extensions

Definition corrected by Casey Mongoven, May 29 2010
a(0) and more terms from Amiram Eldar, Feb 17 2022

A351714 Lucas-Niven numbers: numbers that are divisible by the number of terms in their minimal (or greedy) representation in terms of the Lucas numbers (A130310).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 10, 11, 12, 14, 18, 20, 22, 24, 27, 29, 30, 32, 36, 39, 40, 42, 47, 48, 50, 54, 57, 58, 60, 64, 66, 69, 72, 76, 78, 80, 81, 84, 90, 92, 94, 96, 100, 104, 108, 120, 123, 124, 126, 129, 130, 132, 134, 135, 138, 140, 144, 152, 153, 156, 159, 160
Offset: 1

Views

Author

Amiram Eldar, Feb 17 2022

Keywords

Comments

Numbers k such that A116543(k) | k.

Examples

			6 is a term since its minimal Lucas representation, A130310(6) = 1001, has A116543(6) = 2 1's and 6 is divisible by 2.
		

Crossrefs

Programs

  • Mathematica
    lucasNivenQ[n_] := Module[{s = {}, m = n, k = 1}, While[m > 0, If[m == 1, k = 1; AppendTo[s, k]; m = 0, If[m == 2, k = 0; AppendTo[s, k]; m = 0, While[LucasL[k] <= m, k++]; k--; AppendTo[s, k]; m -= LucasL[k]; k = 1]]]; Divisible[n, Plus @@ IntegerDigits[Total[2^s], 2]]]; Select[Range[160], lucasNivenQ]

A265744 a(n) is the number of Pell numbers (A000129) needed to sum to n using the greedy algorithm (A317204).

Original entry on oeis.org

0, 1, 1, 2, 2, 1, 2, 2, 3, 3, 2, 3, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 3, 4, 2, 3, 3, 4, 4, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 3, 4, 2, 3, 3, 4, 4, 3, 4, 4, 5, 5, 4, 5, 3, 4, 4, 5, 5, 2, 3, 3, 4, 4, 3, 4, 4, 5, 5, 4, 5, 1, 2, 2, 3, 3, 2, 3, 3, 4, 4, 3, 4, 2, 3, 3, 4, 4, 3, 4, 4, 5, 5, 4, 5, 3, 4, 4, 5, 5, 2, 3, 3, 4, 4, 3, 4, 4, 5, 5, 4, 5, 3
Offset: 0

Views

Author

Antti Karttunen, Dec 17 2015

Keywords

Comments

a(0) = 0, because no numbers are needed to form an empty sum, which is zero.
It would be nice to know for sure whether this sequence also gives the least number of Pell numbers that add to n, i.e., that there cannot be even better nongreedy solutions.

References

  • A. F. Horadam, Zeckendorf representations of positive and negative integers by Pell numbers, Applications of Fibonacci Numbers, Springer, Dordrecht, 1993, pp. 305-316.

Crossrefs

Similar sequences: A007895, A116543, A278043.

Programs

  • Mathematica
    pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; a[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[pell[k] <= m, k++]; k--; AppendTo[s, k]; m -= pell[k]; k = 1]; Plus @@ IntegerDigits[Total[3^(s - 1)], 3]]; Array[a, 100, 0] (* Amiram Eldar, Mar 12 2022 *)

Formula

a(n) = A007953(A317204(n)). - Amiram Eldar, Mar 12 2022

A131343 Number of 1's in maximal Lucas representation (A130311) of n.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 3, 3, 4, 4, 4, 4, 5, 4, 4, 4, 5, 4, 4, 5, 5, 5, 5, 6, 4, 4, 5, 5, 5, 5, 6, 5, 5, 5, 6, 5, 5, 6, 6, 6, 6, 7, 5, 5, 5, 6, 5, 5, 6, 6, 6, 6, 7, 5, 5, 6, 6, 6, 6, 7, 6, 6, 6, 7, 6, 6, 7, 7, 7, 7, 8, 5, 5, 6, 6, 6, 6, 7, 6, 6, 6, 7
Offset: 0

Views

Author

Casey Mongoven, Jun 29 2007

Keywords

Crossrefs

Programs

  • Mathematica
    lazy = Select[IntegerDigits[Range[400], 2], SequenceCount[#, {0, 0}] == 0 &]; t = Total[# * Reverse@LucasL[Range[0, Length[#] - 1]]] & /@ lazy; Join[{0}, Plus@@@ lazy[[TakeWhile[Flatten[FirstPosition[t, #] & /@ Range[Max[t]]], NumberQ]]]] (* Amiram Eldar, Feb 17 2022 *)

Formula

a(n) = A007953(A130311(n)). - Amiram Eldar, Feb 17 2022

Extensions

a(0) and more terms from Amiram Eldar, Feb 17 2022

A353655 Number of terms in the Fibonacci-Lucas representation of n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 2, 3, 2, 2, 1, 2, 3, 2, 2, 3, 3, 2, 1, 2, 3, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 1, 2, 3, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 4, 3, 4, 2, 3, 3, 1, 2, 3, 2, 2, 3, 3, 2, 3, 3, 3, 2, 3, 3, 3, 4, 3, 4, 2, 3, 3, 3, 4, 3, 4, 5, 3, 4, 5, 2, 3, 3
Offset: 1

Views

Author

Clark Kimberling, May 02 2022

Keywords

Comments

The Fibonacci-Lucas representation of n, denoted by FL(n), is defined for n>=1 as the sum t(1) + t(2) + ... + t(k), where t(1) is the greatest Fibonacci number (A000045(n), with n>=2) that is <= n, and t(2) is the greatest Lucas number (A000032(n), with n >= 1) that is <= n - t(1), and so on; that is, the greedy algorithm is applied to find successive greatest Fibonacci and Lucas numbers, in alternating order, with sum n. (See Example.)

Examples

			  n      FL(n)
  1   =  1
  2   =  2
  3   =  3
  4   =  3 + 1
  5   =  5
  6   =  5 + 1
  33  =  21 + 11 + 1
  47  =  34 + 11 + 2
  83  =  55 + 18 + 8 + 1 + 1
		

Crossrefs

Programs

  • Mathematica
    z = 120; fib = Map[Fibonacci, Range[2, 51]];
    luc = Map[LucasL, Range[1, 50]];
    t = Map[(n = #; fl = {}; f = 0; l = 0;
         While[IntegerQ[l], n = n - f - l;
          f = fib[[NestWhile[# + 1 &, 1, fib[[#]] <= n &] - 1]];
          l = luc[[NestWhile[# + 1 &, 1, luc[[#]] <= n - f &] - 1]];
          AppendTo[fl, {f, l}]];
         {Total[#], #} &[Select[Flatten[fl], IntegerQ]]) &, Range[z]];
    u = Take[Map[Last, t], z];
    u1 = Map[Length, u]  (* A353655 *)
    t = Map[(n = #; lf = {}; f = 0; l = 0;
         While[IntegerQ[f], n = n - l - f;
          l = luc[[NestWhile[# + 1 &, 1, luc[[#]] <= n &] - 1]];
          f = fib[[NestWhile[# + 1 &, 1, fib[[#]] <= n - l &] - 1]];
          AppendTo[lf, {l, f}]];
         {Total[#], #} &[Select[Flatten[lf], IntegerQ]]) &, Range[z]];
    v = Take[Map[Last, t], z];
    v1 = Map[Length, v]   (* A353656 *)
    u1 - v1  (* A353657 *)
    (* Peter J. C. Moses *)

A353656 Number of terms in the Lucas-Fibonacci representation of n.

Original entry on oeis.org

1, 2, 1, 1, 2, 2, 1, 2, 2, 2, 1, 2, 2, 2, 3, 2, 3, 1, 2, 2, 2, 3, 2, 3, 4, 2, 3, 4, 1, 2, 2, 2, 3, 2, 3, 4, 2, 3, 4, 3, 3, 2, 3, 4, 3, 3, 1, 2, 2, 2, 3, 2, 3, 4, 2, 3, 4, 3, 3, 2, 3, 4, 3, 3, 4, 4, 3, 2, 3, 4, 3, 3, 4, 4, 3, 1, 2, 2, 2, 3, 2, 3, 4, 2, 3, 4
Offset: 1

Views

Author

Clark Kimberling, May 04 2022

Keywords

Comments

The Lucas-Fibonacci representation of n, denoted by LF(n), is defined for n>=1 as the sum t(1) + t(2) + ... + t(k), where t(1) is the greatest Lucas number (A000032(n), with n >= 1) that is <= n, and t(2) is the greatest Fibonacci number (A000045(n), with n >= 2) that is <= n - t(1), and so on; that is, the greedy algorithm is applied to find successive greatest Lucas and Fibonacci numbers, in alternating order, with sum n. (See Example.)

Examples

			   n     LF(n)
   1  =  1
   2  =  1 + 1
   3  =  3
   4  =  4
   5  =  4 + 1
   6  =  4 + 2
  17  =  11 + 5 + 1
  66  =  47 + 13 + 4 + 2
		

Crossrefs

Programs

  • Mathematica
    z = 120; fib = Map[Fibonacci, Range[2, 51]];
    luc = Map[LucasL, Range[1, 50]];
    t = Map[(n = #; fl = {}; f = 0; l = 0;
         While[IntegerQ[l], n = n - f - l;
          f = fib[[NestWhile[# + 1 &, 1, fib[[#]] <= n &] - 1]];
          l = luc[[NestWhile[# + 1 &, 1, luc[[#]] <= n - f &] - 1]];
          AppendTo[fl, {f, l}]];
         {Total[#], #} &[Select[Flatten[fl], IntegerQ]]) &, Range[z]];
    u = Take[Map[Last, t], z];
    u1 = Map[Length, u]  (* A353655 *)
    t = Map[(n = #; lf = {}; f = 0; l = 0;
         While[IntegerQ[f], n = n - l - f;
          l = luc[[NestWhile[# + 1 &, 1, luc[[#]] <= n &] - 1]];
          f = fib[[NestWhile[# + 1 &, 1, fib[[#]] <= n - l &] - 1]];
          AppendTo[lf, {l, f}]];
         {Total[#], #} &[Select[Flatten[lf], IntegerQ]]) &, Range[z]];
    v = Take[Map[Last, t], z];
    v1 = Map[Length, v]   (* A353656 *)
    u1 - v1  (* A353657 *)
    (* Peter J. C. Moses, May 04 2022 *)

A353657 a(n) = A353655(n)- A353656(n).

Original entry on oeis.org

0, -1, 0, 1, -1, 0, 2, -1, 0, 1, 1, 0, -1, 0, 0, 0, -1, 2, 1, 0, -1, -1, 1, -1, -2, 1, 0, -2, 2, 1, 1, 0, 0, -1, -1, -1, 0, -1, -1, 0, -1, 1, 0, -1, -1, 0, 2, 1, 2, 1, 1, 0, 0, -1, -1, -1, -1, -1, -1, 1, 0, -2, 0, 0, -1, -2, 0, 1, 0, 0, 0, 1, -2, -1, 0, 2, 2
Offset: 1

Views

Author

Clark Kimberling, May 04 2022

Keywords

Comments

Conjectures: a(n) = 0 for infinitely many n, and (a(n)) is unbounded below and above.

Examples

			a(7) because A353655(u) = 3 and A353656(7) = 1, since the Fibonacci-Lucas representation of 7 is FL(7) = 5 + 1 + 1, and the Lucas-Fibonacci representation of 7 is LF(7) = 7.
		

Crossrefs

Programs

  • Mathematica
    z = 120; fib = Map[Fibonacci, Range[2, 51]];
    luc = Map[LucasL, Range[1, 50]];
    t = Map[(n = #; fl = {}; f = 0; l = 0;
         While[IntegerQ[l], n = n - f - l;
          f = fib[[NestWhile[# + 1 &, 1, fib[[#]] <= n &] - 1]];
          l = luc[[NestWhile[# + 1 &, 1, luc[[#]] <= n - f &] - 1]];
          AppendTo[fl, {f, l}]];
         {Total[#], #} &[Select[Flatten[fl], IntegerQ]]) &, Range[z]];
    u = Take[Map[Last, t], z];
    u1 = Map[Length, u]  (* A353655 *)
    t = Map[(n = #; lf = {}; f = 0; l = 0;
         While[IntegerQ[f], n = n - l - f;
          l = luc[[NestWhile[# + 1 &, 1, luc[[#]] <= n &] - 1]];
          f = fib[[NestWhile[# + 1 &, 1, fib[[#]] <= n - l &] - 1]];
          AppendTo[lf, {l, f}]];
         {Total[#], #} &[Select[Flatten[lf], IntegerQ]]) &, Range[z]];
    v = Take[Map[Last, t], z];
    v1 = Map[Length, v]   (* A353656 *)
    u1 - v1  (* A353657 *)
    (* Peter J. C. Moses *)
Showing 1-10 of 16 results. Next