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

A351712 Numbers whose minimal (or greedy) Lucas representation (A130310) is palindromic.

Original entry on oeis.org

0, 2, 6, 9, 13, 20, 24, 31, 49, 56, 64, 78, 100, 125, 136, 150, 158, 169, 201, 237, 252, 324, 342, 364, 378, 396, 404, 422, 444, 523, 581, 606, 650, 708, 845, 874, 910, 932, 961, 975, 1004, 1040, 1048, 1077, 1113, 1135, 1164, 1366, 1460, 1500, 1572, 1666, 1692, 1786
Offset: 1

Views

Author

Amiram Eldar, Feb 17 2022

Keywords

Comments

A000211(n) = Lucas(n) + 2 is a term for all n > 2, since the representation of Lucas(n) + 2 is 10...01 with n-1 0's between the two 1's.

Examples

			The first 10 terms are:
   n  a(n) A130310(a(n))
   ---------------------
   1   0               0
   2   2               1
   3   6            1001
   4   9           10001
   5  13          100001
   6  20         1000001
   7  24         1001001
   8  31        10000001
   9  49       100000001
  10  56       100010001
		

Crossrefs

Subsequence of A054770.
Similar sequences: A002113, A006995, A014190, A094202, A331191, A351717.

Programs

  • Mathematica
    lucasPalQ[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]]]; PalindromeQ[IntegerDigits[Total[2^s], 2]]]; Select[Range[0, 2000], lucasPalQ]

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]

A131340 Number of 0's in minimal Lucas representation (A130310) of n.

Original entry on oeis.org

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

Views

Author

Casey Mongoven, Jun 29 2007

Keywords

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]]]; Total[1 - IntegerDigits[Total[2^s], 2]]]; Array[a, 100] (* Amiram Eldar, Jul 05 2025 *)

Extensions

More terms from Amiram Eldar, Jul 05 2025

A133770 Number of runs (of equal bits) in the minimal Lucas binary (A130310) representation of n.

Original entry on oeis.org

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

Views

Author

Casey Mongoven, Sep 23 2007

Keywords

Examples

			A130310(17)=101001 because 11 + 4 + 2 = 17 (a sum of Lucas numbers); this representation has five runs: 1,0,1,00,1. So a(17)=5.
		

References

  • Zeckendorf, E., Représentation des nombres naturels par une somme des nombres de Fibonacci ou de nombres de Lucas, Bull. Soc. Roy. Sci. Liège 41, 179-182, 1972.

Crossrefs

A178245 If one lines up the columns of the binary representations in A130310, the minimal (or "greedy") Lucas representation of n, this sequence gives the column number (starting with 0) of the starting point of the blocks of 1s which occur.

Original entry on oeis.org

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

Views

Author

Casey Mongoven, May 23 2010

Keywords

Crossrefs

A278038 Binary vectors not containing three consecutive 1's; or, representation of n in the tribonacci base.

Original entry on oeis.org

0, 1, 10, 11, 100, 101, 110, 1000, 1001, 1010, 1011, 1100, 1101, 10000, 10001, 10010, 10011, 10100, 10101, 10110, 11000, 11001, 11010, 11011, 100000, 100001, 100010, 100011, 100100, 100101, 100110, 101000, 101001, 101010, 101011, 101100, 101101, 110000, 110001, 110010, 110011, 110100, 110101, 110110, 1000000
Offset: 0

Views

Author

N. J. A. Sloane, Nov 16 2016

Keywords

Comments

These are the nonnegative numbers written in the tribonacci numbering system.

Examples

			The tribonacci numbers (as in A000073(n), for n >= 3) are 1, 2, 4, 7, 13, 24, 44, 81, ... In terms of this base, 7 is written 1000, 8 is 1001, 11 is 1100, 12 is 1101, 13 is 10000, etc. Zero is 0.
		

Crossrefs

Cf. A000073, A080843 (tribonacci word, tribonacci tree).
See A003726 for the decimal representations of these binary strings.
Similar sequences: A014417 (Fibonacci), A130310 (Lucas).

Programs

  • Maple
    # maximum index in A73 such that A73 <= n.
    A73floorIdx := proc(n)
        local k ;
        for k from 3 do
            if A000073(k) = n then
                return k ;
            elif A000073(k) > n then
                return k -1 ;
            end if ;
        end do:
    end proc:
    A278038 := proc(n)
        local k,L,nres ;
        if n = 0 then
            0;
        else
            k := A73floorIdx(n) ;
            L := [1] ;
            nres := n-A000073(k) ;
            while k >= 4 do
                k := k-1 ;
                if nres >= A000073(k) then
                    L := [1,op(L)] ;
                    nres := nres-A000073(k) ;
                else
                    L := [0,op(L)] ;
                end if ;
            end do:
            add( op(i,L)*10^(i-1),i=1..nops(L)) ;
        end if;
    end proc:
    seq(A278038(n),n=0..40) ; # R. J. Mathar, Jun 08 2022
  • Mathematica
    t[1] = 1; t[2] = 2; t[3] = 4; t[n_] := t[n] = t[n - 1] + t[n - 2] + t[n - 3]; a[n_] := Module[{s = {}, m = n, k}, While[m > 0, k = 1; While[t[k] <= m, k++]; k--; AppendTo[s, k]; m -= t[k]; k = 1]; FromDigits @ IntegerDigits[Total[2^(s - 1)], 2]]; Array[a, 100, 0] (* Amiram Eldar, Mar 04 2022 *)

A116543 Number of terms in greedy representation of n in terms of the Lucas numbers.

Original entry on oeis.org

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

Views

Author

James E Davis, Mar 28 2006, Jun 07 2006

Keywords

Comments

I have been studying A007895 and similar sequences and created this sequence as an analog of A007895 for the Lucas sequence (A000032).

Examples

			a(12)=2 because 12=11+1.
		

Crossrefs

Programs

  • Mathematica
    s = Reverse[Sort[Table[LucasL[n - 1], {n, 1, 22}]]];
    t = Map[Length[Select[Reap[FoldList[(Sow[Quotient[#1, #2]]; Mod[#1, #2]) &, #, s]][[2,1]], # > 0 &]] &, Range[1000]] (* Peter J. C. Moses, Oct 18 2012 *)

Formula

Let L(n) = max(Lucas numbers < n). Then a(0) = 0, a(n) = 1 + a(n-L(n)).
a(n) = A007953(A130310(n)). - Amiram Eldar, Feb 17 2022

Extensions

Edited by N. J. A. Sloane, Aug 10 2007
a(0) added by Amiram Eldar, Feb 17 2022

A054770 Numbers that are not the sum of distinct Lucas numbers 1,3,4,7,11, ... (A000204).

Original entry on oeis.org

2, 6, 9, 13, 17, 20, 24, 27, 31, 35, 38, 42, 46, 49, 53, 56, 60, 64, 67, 71, 74, 78, 82, 85, 89, 93, 96, 100, 103, 107, 111, 114, 118, 122, 125, 129, 132, 136, 140, 143, 147, 150, 154, 158, 161, 165, 169, 172, 176, 179, 183, 187, 190, 194, 197, 201, 205, 208, 212
Offset: 1

Views

Author

Antreas P. Hatzipolakis (xpolakis(AT)otenet.gr), May 28 2000

Keywords

Comments

Alternatively, Lucas representation of n includes L_0 = 2. - Fred Lunnon, Aug 25 2001
Conjecture: this is the sequence of numbers for which the base phi representation includes phi itself, where phi = (1 + sqrt(5))/2 = the golden ratio. Example: let r = phi; then 6 = r^3 + r + r^(-4). - Clark Kimberling, Oct 17 2012
This conjecture is proved in my paper 'Base phi representations and golden mean beta-expansions', using the formula by Wilson/Agol/Carlitz et al. - Michel Dekking, Jun 25 2019
Numbers whose minimal Lucas representation (A130310) ends with 1. - Amiram Eldar, Jan 21 2023

Crossrefs

Complement of A063732.

Programs

  • Magma
    [Floor(n*(Sqrt(5)+5)/2)-1: n in [1..60]]; // Vincenzo Librandi, Oct 30 2018
    
  • Maple
    A054770 := n -> floor(n*(sqrt(5)+5)/2)-1;
  • Mathematica
    Complement[Range[220],Total/@Subsets[LucasL[Range[25]],5]] (* Harvey P. Dale, Feb 27 2012 *)
    Table[Floor[n (Sqrt[5] + 5) / 2] - 1, {n, 60}] (* Vincenzo Librandi, Oct 30 2018 *)
  • PARI
    a(n)=floor(n*(sqrt(5)+5)/2)-1
    
  • Python
    from math import isqrt
    def A054770(n): return (n+isqrt(5*n**2)>>1)+(n<<1)-1 # Chai Wah Wu, Aug 17 2022

Formula

a(n) = floor(((5+sqrt(5))/2)*n)-1 (conjectured by David W. Wilson; proved by Ian Agol (iagol(AT)math.ucdavis.edu), Jun 08 2000)
a(n) = A000201(n) + 2*n - 1. - Michel Dekking, Sep 07 2017
G.f.: x*(x+1)/(1-x)^2 + Sum_{i>=1} (floor(i*phi)*x^i), where phi = (1 + sqrt(5))/2. - Iain Fox, Dec 19 2017
Ian Agol tells me that David W. Wilson's formula is proved in the Carlitz, Scoville, Hoggatt paper 'Lucas representations'. See Equation (1.12), and use A(A(n))+n = B(n)+n-1 = A(n)+2*n-1, the well known formulas for the lower Wythoff sequence A = A000201, and the upper Wythoff sequence B = A001950. - Michel Dekking, Jan 04 2018

Extensions

More terms from James Sellers, May 28 2000

A317204 Expansion of n in the p-system based on convergents to sqrt(2).

Original entry on oeis.org

0, 1, 10, 11, 20, 100, 101, 110, 111, 120, 200, 201, 1000, 1001, 1010, 1011, 1020, 1100, 1101, 1110, 1111, 1120, 1200, 1201, 2000, 2001, 2010, 2011, 2020, 10000, 10001, 10010, 10011, 10020, 10100, 10101, 10110, 10111, 10120, 10200, 10201, 11000, 11001, 11010, 11011
Offset: 0

Views

Author

N. J. A. Sloane, Aug 07 2018

Keywords

Comments

This is the minimal (or greedy) representation of nonnegative numbers in terms of the positive Pell numbers (A000129). - Amiram Eldar, Mar 12 2022

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 to, but different from, A014418.
Similar sequences: A014417, A130310, A278038.

Programs

  • Mathematica
    pell[1] = 1; pell[2] = 2; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; pellp[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]; FromDigits @ IntegerDigits[Total[3^(s - 1)], 3]]; Array[pellp, 50, 0] (* Amiram Eldar, Mar 12 2022 *)
  • PARI
    a(n) = { my (p=[1,2]); for (k=2, oo, if (n<=p[k], my (v=0, d); while (n, v+=10^k*d=n\p[k]; n-=d*p[k]; k--); return (v/10), p = concat(p, 2*p[k]+p[k-1]))) } \\ Rémy Sigrist, Mar 12 2022

Extensions

More terms from Amiram Eldar, Mar 12 2022

A130311 Maximal (or "lazy") Lucas representation of n. Binary system for representing integers using Lucas numbers (A000032) as a base.

Original entry on oeis.org

0, 10, 1, 11, 110, 101, 111, 1011, 1110, 1101, 1111, 10110, 10101, 10111, 11011, 11110, 11101, 11111, 101011, 101110, 101101, 101111, 110110, 110101, 110111, 111011, 111110, 111101, 111111, 1010110, 1010101, 1010111, 1011011, 1011110, 1011101, 1011111, 1101011, 1101110
Offset: 0

Views

Author

Casey Mongoven, May 21 2007; corrected Mar 23 2008

Keywords

Examples

			a(7) = 1110 because 4 + 3 + 1 = 8.
a(8) = 1101 because 4 + 3 + 2 = 9.
		

References

  • 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
    lazy = Select[IntegerDigits[Range[10^2], 2], SequenceCount[#, {0, 0}] == 0 &]; t = Total[# * Reverse@LucasL[Range[0, Length[#] - 1]]] & /@ lazy; Join[{0}, FromDigits /@ lazy[[TakeWhile[Flatten[FirstPosition[t, #] & /@ Range[Max[t]]], NumberQ]]]] (* Amiram Eldar, Feb 17 2022 *)

Extensions

a(0) and more terms from Amiram Eldar, Feb 17 2022
Showing 1-10 of 16 results. Next