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.

Previous Showing 21-30 of 45 results. Next

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

A350215 A048715, written in binary.

Original entry on oeis.org

0, 1, 10, 100, 1000, 1001, 10000, 10001, 10010, 100000, 100001, 100010, 100100, 1000000, 1000001, 1000010, 1000100, 1001000, 1001001, 10000000, 10000001, 10000010, 10000100, 10001000, 10001001, 10010000, 10010001, 10010010, 100000000, 100000001, 100000010
Offset: 0

Views

Author

A.H.M. Smeets, Dec 19 2021

Keywords

Comments

Narayana weighted representation of n (the top version).
a(n) equals binary representation of m, if and only if A350311(m) = n and for all k > m A350311(k) > n.

Crossrefs

Fibonacci representations: A014417 (Zeckendorf), A104326 (dual Zeckendorf).

Programs

  • Mathematica
    bin[n_] := FromDigits[IntegerDigits[n, 2]]; q[n_] := BitAnd[n, 6*n] == 0; bin /@ Select[Range[0, 250], q] (* Amiram Eldar, Jan 27 2022 *)
  • Python
    def c(b): return not "11" in b and not "101" in b
    def auptod(digits):
        return [int(b) for b in (bin(k)[2:] for k in range(2**digits)) if c(b)]
    print(auptod(9)) # Michael S. Branicky, Dec 20 2021

Formula

Regular expression 0|(1000*)*10*.

A130312 Each Fibonacci number F(n) appears F(n) times.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 3, 5, 5, 5, 5, 5, 8, 8, 8, 8, 8, 8, 8, 8, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34
Offset: 1

Views

Author

Edwin F. Sampang, May 21 2007

Keywords

Comments

Also n-1-s(n-1), where s(n) is the length of the longest proper suffix of p, the length-n prefix of the infinite Fibonacci word (A003849), that appears twice in p. - Jeffrey Shallit, Mar 20 2017
a(n+1) = the least period of the length-n prefix of the infinite Fibonacci word (A003849). A period of a length-n word x is an integer p, 1 <= p <= n such that x[i] = x[i+p] for 1 <= i <= n-p. - Jeffrey Shallit, May 23 2020
a(n) is the largest term in dual Zeckendorf representation of n-1 (A104326), for n >= 2. - Amiram Eldar, Aug 09 2024

Examples

			As triangle:
   1;
   1;
   2,  2;
   3,  3,  3;
   5,  5,  5,  5,  5;
   8,  8,  8,  8,  8,  8,  8,  8;
  13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13;
  ...
		

Crossrefs

Programs

  • Maple
    T:= n-> (f-> f$f)((<<0|1>, <1|1>>^n)[1,2]):
    seq(T(n), n=1..10);  # Alois P. Heinz, Nov 23 2024
  • Mathematica
    Flatten[Table[#,{#}]&/@Fibonacci[Range[10]]] (* Harvey P. Dale, Apr 18 2012 *)
  • PARI
    a(n) = my(m=0); until(fibonacci(m)>n, m++); fibonacci(m-2); \\ Michel Marcus, Nov 26 2022
  • Python
    from itertools import islice
    def A130312_gen(): # generator of terms
        a, b = 1, 1
        while True:
            yield from (a,)*a
            a, b = b, a+b
    A130312_list = list(islice(A130312_gen(),20)) # Chai Wah Wu, Oct 13 2022
    
  • Python
    def A130312(n):
        a, b = 0, 1
        while (c:=a+b) <= n: a, b = b, c
        return a # Chai Wah Wu, Nov 23 2024
    

Formula

a(n) = A000045(A072649(n)). - Michel Marcus, Aug 03 2022

Extensions

More terms from Harvey P. Dale, Apr 18 2012

A339212 Dual-Zeckendorf self numbers: numbers not of the form k + A112310(k).

Original entry on oeis.org

1, 4, 8, 10, 14, 17, 19, 28, 31, 33, 39, 41, 50, 53, 55, 59, 63, 66, 68, 74, 76, 85, 88, 90, 97, 106, 109, 111, 115, 119, 122, 124, 130, 132, 141, 144, 146, 153, 156, 158, 164, 166, 175, 178, 180, 187, 196, 199, 201, 205, 209, 212, 214, 220, 222, 231, 234, 236
Offset: 1

Views

Author

Amiram Eldar, Nov 27 2020

Keywords

Comments

Analogous to self numbers (A003052) using the dual Zeckendorf representation (A104326) instead of decimal expansion.

References

  • József Sándor and Borislav Crstici, Handbook of Number theory II, Kluwer Academic Publishers, 2004, Chapter 4, p. 384-386.

Crossrefs

Programs

  • Mathematica
    fibTerms[n_] := Module[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; fr]; dzs[n_] := n + Module[{v = fibTerms[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] == 1 && v[[i + 1]] == 0 && v[[i + 2]] == 0, v[[i]] = 0; v[[i + 1]] = 1; v[[i + 2]] = 1; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, Total[v[[i[[1, 1]] ;; -1]]]]]; m = 240; Complement[Range[m], Array[dzs, m]]

A381579 The Chung-Graham representation of n: representation of n in base of even-indexed Fibonacci numbers.

Original entry on oeis.org

0, 1, 2, 10, 11, 12, 20, 21, 100, 101, 102, 110, 111, 112, 120, 121, 200, 201, 202, 210, 211, 1000, 1001, 1002, 1010, 1011, 1012, 1020, 1021, 1100, 1101, 1102, 1110, 1111, 1112, 1120, 1121, 1200, 1201, 1202, 1210, 1211, 2000, 2001, 2002, 2010, 2011, 2012, 2020, 2021
Offset: 0

Views

Author

Amiram Eldar, Feb 28 2025

Keywords

Comments

Chung and Graham (1981, 1984) proved that every nonnegative integer n can be uniquely represented as a sum n = Sum_{i>=1} d_i * Fibonacci(2*i), where each d_i is in {0, 1, 2}, and if d_i = d_j = 2 with i < j, then for some k, i < k < j, we have d_k = 0.

Examples

			a(3) = 10 since 3 = 1 * 3 + 0 * 1 = 3 * Fibonacci(2*2) + 0 * Fibonacci(2*1).
a(10) = 102 since 10 = 1 * 8 + 0 * 3 + 2 * 1 = 1 * Fibonacci(2*3) + 0 * Fibonacci(2*2) + 2 * Fibonacci(2*1).
		

Crossrefs

Cf. A000045, A001906, A291711 (sum of digits).
Similar sequences: A014417, A104326.

Programs

  • Mathematica
    f[n_] := f[n] = Fibonacci[2*n]; a[n_] := Module[{s = 0, m = n, k}, While[m > 0, k = 1; While[m > f[k], k++]; If[m < f[k], k--]; If[m >= 2*f[k], s += 2*10^(k-1); m -= 2*f[k], s += 10^(k-1); m -= f[k]]]; s]; Array[a, 50, 0]
  • PARI
    m = 20; fvec = vector(m, i, fibonacci(2*i)); f(n) = if(n <= m, fvec[n], fibonacci(2*n));
    a(n) = {my(s = 0, m = n, k); while(m > 0, k = 1; while(m > f(k), k++); if(m < f(k), k--); if(m >= 2*f(k), s += 2*10^(k-1); m -= 2*f(k), s += 10^(k-1); m -= f(k))); s;}

A035508 a(n) = Fibonacci(2*n+2) - 1.

Original entry on oeis.org

0, 2, 7, 20, 54, 143, 376, 986, 2583, 6764, 17710, 46367, 121392, 317810, 832039, 2178308, 5702886, 14930351, 39088168, 102334154, 267914295, 701408732, 1836311902, 4807526975, 12586269024, 32951280098, 86267571271, 225851433716
Offset: 0

Views

Author

Keywords

Comments

Except for 0, numbers whose dual Zeckendorf representation (A104326) has the same number of 0's as 1's. - Amiram Eldar, Mar 22 2021

Crossrefs

With different offset: 2nd row of Inverse Stolarsky array A035507.
Cf. A001906, A104326, A112844, A152891 (partial sums).

Programs

  • Magma
    [Fibonacci(2*n+2)-1: n in [0..30]]; // Vincenzo Librandi, Apr 18 2011
    
  • Maple
    g:=z/(1-3*z+z^2): gser:=series(g, z=0, 43): seq(abs(coeff(gser, z, n)-1), n=1..26); # Zerinvary Lajos, Mar 22 2009
    with(combinat):seq(fibonacci(4*n+2) mod fibonacci(2*n+2),n=0..25);
  • Mathematica
    Fibonacci[2*Range[0, 5!]] - 1 (* Vladimir Joseph Stephan Orlovsky, May 18 2010 *)
    LinearRecurrence[{4,-4,1},{0,2,7},40] (* Harvey P. Dale, Jan 15 2025 *)
  • Maxima
    makelist(fib(2*n+2)-1,n,0,30); /* Martin Ettl, Oct 21 2012 */
  • MuPAD
    numlib::fibonacci(2*n)-1 $ n = 1..38; // Zerinvary Lajos, May 08 2008
    
  • Sage
    [lucas_number1(n, 3, 1)-1 for n in range(1, 27)] # Zerinvary Lajos, Dec 07 2009
    

Formula

a(n) = A001906(n) - 1.
G.f.: x*(2 - x)/((1 - x)*(1 - 3*x + x^2)). a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3). - R. J. Mathar, Dec 15 2008; adapted to the offset by Bruno Berselli, Apr 19 2011
a(n) = Fibonacci(4*n+2) mod Fibonacci(2*n+2). - Gary Detlefs, Nov 22 2010
a(n+1) = Sum_{k=0..n} Fibonacci(2*k+3). - Gary Detlefs, Dec 24 2010
a(n) = Sum_{i=1..n} A112844(i). - R. J. Mathar, Apr 19 2011
a(n) = floor(Fibonacci(2*n+2) - Fibonacci(n+1)^2/Fibonacci(2*n+2)). - Gary Detlefs, Dec 21 2012
From Peter Bala, Nov 14 2021: (Start)
a(n) = Fibonacci(2*n+4)*(Fibonacci(2*n+1) - 1)/(Fibonacci(2*n+3) - 1).
a(n)= -2 + Sum_{k = 1..2*n+3} (-1)^(k+1)*Fibonacci(k). (End)

A352339 a(n) is the maximal (or lazy) Pell representation of n using a ternary system of vectors.

Original entry on oeis.org

0, 1, 10, 11, 20, 21, 22, 110, 111, 120, 121, 122, 210, 211, 220, 221, 1020, 1021, 1022, 1110, 1111, 1120, 1121, 1122, 1210, 1211, 1220, 1221, 2020, 2021, 2022, 2110, 2111, 2120, 2121, 2122, 2210, 2211, 2220, 2221, 2222, 10210, 10211, 10220, 10221, 11020, 11021
Offset: 0

Views

Author

Amiram Eldar, Mar 12 2022

Keywords

Comments

There are 2 well-established systems of giving every nonnegative integer a unique representation as a sum of positive Pell numbers (A000129), 1, 2, 5, 12, 29, 70, ...: the minimal (or greedy) representation (A317204) in which any occurrence of the digit 2 is succeeded by a 0 (i.e., if a Pell number appears twice in the sum, its preceding term in the Pell sequence does not appear), and the maximal (or lazy) representation of n in which any occurrence of the digit 0 is succeeded by a 2 (i.e., if a Pell number does not appear in the sum, its preceding term in the Pell sequence appears twice). [Edited by Amiram Eldar and Peter Munn, Oct 04 2022]

Examples

			a(5) = 21 since 5 = 2*2 + 1.
a(6) = 22 since 6 = 2*2 + 2.
a(7) = 110 since 7 = 5 + 2.
We read the first term, 0, like the others, as a list of ternary digits. It has no 1s or 2s in it, so 0 here indicates a sum of 0 Pell numbers. This is called an "empty sum" (see Wiki link) and its total is 0. So 0 represents 0. - _Peter Munn_, Oct 04 2022
		

Crossrefs

Similar sequences: A104326 (Fibonacci), A130311 (Lucas), A352103 (tribonacci).

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]; IntegerDigits[Total[3^(s - 1)], 3]]; a[n_] := Module[{v = pellp[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] > 0 && v[[i + 1]] == 0 && v[[i + 2]] < 2, v[[i ;; i + 2]] += {-1, 2, 1}; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, FromDigits[v[[i[[1, 1]] ;; -1]]]]]; Array[a, 100, 0]

A112309 Triangle read by rows: row n gives terms in lazy Fibonacci representation of n.

Original entry on oeis.org

1, 2, 1, 2, 1, 3, 2, 3, 1, 2, 3, 2, 5, 1, 2, 5, 1, 3, 5, 2, 3, 5, 1, 2, 3, 5, 1, 3, 8, 2, 3, 8, 1, 2, 3, 8, 2, 5, 8, 1, 2, 5, 8, 1, 3, 5, 8, 2, 3, 5, 8, 1, 2, 3, 5, 8, 2, 5, 13, 1, 2, 5, 13, 1, 3, 5, 13, 2, 3, 5, 13, 1, 2, 3, 5, 13, 1, 3, 8, 13, 2, 3, 8, 13, 1, 2, 3, 8, 13, 2, 5, 8, 13, 1, 2, 5, 8, 13, 1, 3
Offset: 1

Views

Author

N. J. A. Sloane, Dec 01 2005

Keywords

Comments

Write n as a sum c_2 F_2 + c_3 F_3 + ..., where the F_i are Fibonacci numbers and the c_i are 0 or 1. The lazy expansion is the minimal one in the lexicographic order, in contrast to the Zeckendorf expansion (A035517, A007895), which is the maximal one.
In other words we give preference to the smallest Fibonacci numbers.

Examples

			Triangle begins:
1 meaning 1 = 1
2 meaning 2 = 2
1 2 meaning 3 = 1+2
1 3 meaning 4 = 1+3
2 3 meaning 5 = 2+3
1 2 3 meaning 6 = 1+2+3 (and not the Zeckendorf expansion 1+5)
2 5 meaning 7 = 2+5
		

Crossrefs

Programs

  • Maple
    A112309 := proc(n)
        local z,d ;
        z := convert(A104326(n),base,10) ;
        for d from 1 to nops(z) do
            if op(d,z) > 0 then
                printf("%d,",combinat[fibonacci](d+1)) ;
            end if;
        end do:
    end proc:
    for n from 1 to 20 do
        A112309(n) ;
    end do: # R. J. Mathar, Aug 28 2025
  • Mathematica
    DeleteCases[IntegerDigits[Range[200], 2], {_, 0, 0, _}]
    A112309 = Map[DeleteCases[Reverse[#] Fibonacci[Range[Length[#]] + 1], 0] &, DeleteCases[IntegerDigits[-1 + Range[200], 2], {_, 0, 0, _}]]
    A112310 = Map[Length, A112309]
    (* Peter J. C. Moses, Mar 03 2015 *)
  • PARI
    See Links section.

Extensions

Extended by Ray Chandler, Dec 01 2005

A163851 Primes of the form Fibonacci(k)-2.

Original entry on oeis.org

3, 11, 19, 53, 6763, 354224848179261915073, 6356306993006846248181, 6549923758702735390139183573072808204317151158828986996794832713116199613609647330495585293499629115294769, 131000268055609921839337880403168874871518195097038587116150308718344497444830568622793920406537331453336153249817445002421
Offset: 1

Views

Author

Keywords

Comments

Contains the numbers A000045(k)-2 for k = 5, 7, 8, 10, 20, 100, 106, 508, 586, ...
which equal A000040(j) for j = 2, 5, 8, 16, 871,...
Repunit primes in the lazy Fibonacci representation (A104326). - A.H.M. Smeets, Jun 26 2025

Programs

  • Mathematica
    Clear[lst,a,f,n,p]; a=2;lst={};Do[f=Fibonacci[n];If[PrimeQ[p=f-a]&&p>1,AppendTo[lst,p]],{n,3*6!}];lst
    Select[Fibonacci[Range[4,1000]]-2,PrimeQ] (* Harvey P. Dale, Jan 12 2019 *)

Extensions

Indices into Fibonacci and prime sequences added by R. J. Mathar, Aug 18 2009

A330711 Numbers that are both Zeckendorf-Niven numbers (A328208) and lazy-Fibonacci-Niven numbers (A328212).

Original entry on oeis.org

1, 2, 4, 6, 12, 16, 30, 36, 48, 55, 60, 72, 78, 84, 90, 102, 105, 126, 144, 156, 168, 180, 184, 192, 208, 238, 240, 252, 264, 304, 315, 320, 322, 344, 360, 370, 378, 396, 430, 432, 488, 528, 536, 540, 576, 590, 605, 609, 621, 639, 648, 657, 660, 672, 680, 702
Offset: 1

Views

Author

Amiram Eldar, Dec 27 2019

Keywords

Examples

			6 is in the sequence since A007895(6) = 2 and A112310(6) = 3, and both 2 and 3 are divisors of 6.
		

Crossrefs

Intersection of A328208 and A328212.

Programs

  • Mathematica
    zeckSum[n_] := Length[DeleteCases[NestWhileList[# - Fibonacci[Floor[Log[Sqrt[5]*# + 3/2]/Log[GoldenRatio]]] &, n, # > 1 &], 0]];
    fibTerms[n_] := Module[{k = Ceiling[Log[GoldenRatio, n*Sqrt[5]]], t = n, fr = {}}, While[k > 1, If[t >= Fibonacci[k], AppendTo[fr, 1]; t = t - Fibonacci[k], AppendTo[fr, 0]]; k--]; fr];
    dualZeckSum[n_] := Module[{v = fibTerms[n]}, nv = Length[v]; i = 1; While[i <= nv - 2, If[v[[i]] == 1 && v[[i + 1]] == 0 && v[[i + 2]] == 0, v[[i]] = 0; v[[i + 1]] = 1; v[[i + 2]] = 1; If[i > 2, i -= 3]]; i++]; i = Position[v, _?(# > 0 &)]; If[i == {}, 0, Total[v[[i[[1, 1]] ;; -1]]]]];
    Select[Range[1000], Divisible[#, zeckSum[#]] && Divisible[#, dualZeckSum[#]] &]
Previous Showing 21-30 of 45 results. Next