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

A272912 Difference sequence of the sequence A116470 of all distinct Fibonacci numbers and Lucas numbers (A000032).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 3, 2, 5, 3, 8, 5, 13, 8, 21, 13, 34, 21, 55, 34, 89, 55, 144, 89, 233, 144, 377, 233, 610, 377, 987, 610, 1597, 987, 2584, 1597, 4181, 2584, 6765, 4181, 10946, 6765, 17711, 10946, 28657, 17711, 46368, 28657, 75025, 46368, 121393, 75025
Offset: 1

Views

Author

Clark Kimberling, May 10 2016

Keywords

Comments

Every term is a Fibonacci number (A000045).

Examples

			A116470 = (1, 2, 3, 4, 5, 7, 8, 11, 13, 18, 21, 29, 34, 47, 55, 76,...), so that (a(n)) = (1,1,1,1,2,1,3,2,5,3,8,5,13,8,12,...).
		

Crossrefs

Programs

  • Mathematica
    u = Table[Fibonacci[n], {n, 1, 200}]; v = Table[LucasL[n], {n, 1, 200}];
    Take[Differences[Union[u, v]], 100]
  • PARI
    Vec(x*(1+x-x^5)/(1-x^2-x^4) + O(x^50)) \\ Colin Barker, May 10 2016

Formula

From Colin Barker, May 10 2016: (Start)
a(n) = a(n-2)+a(n-4) for n>4.
G.f.: x*(1+x-x^5) / (1-x^2-x^4).
(End)
a(n) = A053602(n-2), n>2. - R. J. Mathar, May 20 2016
a(n) = A123231(n-3), n>3. - Georg Fischer, Oct 23 2018

A214973 Number of terms in greedy representation of n using Fibonacci and Lucas numbers.

Original entry on oeis.org

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

Views

Author

Clark Kimberling, Oct 20 2012

Keywords

Comments

Consider the sequence b = A116470 consisting of all the Fibonacci numbers and Lucas numbers. For n>=0, let k(1) be the greatest k in the basis b = {b(k)} such that b(k) <= n, let k(2) be the greatest k in b such that k <= n-b(k(1)), and so on, resulting in the greedy b-representation (to be abbreviated as "rep") of n. For comparison with the rep using A000045 as basis (called Zeckendorf, or Fibonacci, rep) and also with the rep using A000032 as basis (called the Lucas rep), it is natural to ask this: what terms in b can possibly follow a given term b(k)? The answer follows.
If b(k) < 21 = b(11), the terms that can follow b(k) are easily found and not recorded here. Otherwise, if k is odd, then b(k) can be followed by b(k-i) for some i>=5; if k is even, then b(k) can be followed by b(k-i) for some i>=8. In Zeckendorf and Lucas reps, the "lag" is k-i for i>=2.
Conjecture: a(A049651(n)) = n and this is the first instance of n in the sequence for all n > 0. In other words, apart from its initial term, A049651 is the RECORDS transform of this sequence. - Charles R Greathouse IV, Oct 14 2021

Examples

			Let F, L, U denote the Fibonacci (aka Zeckendorf), Lucas, and greedy F-union-L representations.  Then 45 = 34+8+3 (F) = 29+11+4+1 (L) = 34+11 (U), which shows that a(45) = 2 and that the U representation of 45 requires fewer terms than the others; 45 is the least number having this property.
		

Crossrefs

Programs

  • Mathematica
    s = Reverse[Union[Flatten[Table[{Fibonacci[n + 1], LucasL[n - 1]}, {n, 1, 22}]]]]; Map[Length[Select[Reap[FoldList[(Sow[Quotient[#1, #2]]; Mod[#1, #2]) &, #, s]]
    [[2, 1]], # > 0 &]] &, Range[120]]
    (* Peter J. C. Moses, Oct 18 2012 *)
  • PARI
    w(n)=if(n%2, fibonacci(n\2+3), fibonacci(n\2) + fibonacci(n\2+2));
    k(n)=if(n<9, return(if(n==6,5,n))); for(i=8,n, if(w(i)>n, return(w(i-1))));
    a(n)=my(s); while(n, n-=k(n); s++); s; \\ Charles R Greathouse IV, Oct 14 2021

Formula

Conjecture: a(n) = A329320(A048679(n)) for n > 0 (noticed by Sequence Machine). - Mikhail Kurkov, Oct 13 2021

A115339 a(2n-1)=F(n+1), a(2n)=L(n), where F(n) and L(n) are the Fibonacci and the Lucas sequences.

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 5, 7, 8, 11, 13, 18, 21, 29, 34, 47, 55, 76, 89, 123, 144, 199, 233, 322, 377, 521, 610, 843, 987, 1364, 1597, 2207, 2584, 3571, 4181, 5778, 6765, 9349, 10946, 15127, 17711, 24476, 28657, 39603, 46368, 64079, 75025, 103682, 121393, 167761
Offset: 1

Views

Author

Giuseppe Coppoletta, Mar 06 2006

Keywords

Comments

Alternate Fibonacci and Lucas sequence respecting their natural order.
See A116470 for an essentially identical sequence.
The ratio a(n+1)/a(n) increasingly approximates two constants: (5-sqrt(5))/2 (A094874) and (5+3*sqrt(5))/10 (A176015) according to whether n is odd or even. - Davide Rotondo, Oct 27 2024

Crossrefs

Programs

  • Haskell
    a115339 n = a115339_list !! (n-1)
    a115339_list = [1, 1, 2, 3] ++
                   zipWith (+) a115339_list (drop 2 a115339_list)
    -- Reinhard Zumkeller, Aug 03 2013
    
  • Mathematica
    f[n_] := If[OddQ@n, Fibonacci[(n + 3)/2], Fibonacci[n/2 - 1] + Fibonacci[n/2 + 1]]; Array[f, 50] (* Robert G. Wilson v, Apr 29 2006 *)
  • PARI
    x='x+O('x^50); Vec(x*(-1-x-x^2-2*x^3)/(-1+x^2+x^4)) \\ G. C. Greubel, Apr 27 2017

Formula

a(n+2) = a(n) + a(n-2).
G.f.: x*( -1-x-x^2-2*x^3 ) / ( -1+x^2+x^4 ). - R. J. Mathar, Mar 08 2011

Extensions

More terms from Robert G. Wilson v, Apr 29 2006

A355324 Lower midsequence of the Fibonacci numbers (1,2,3,5,8,...) and Lucas numbers (1,3,4,7,11,...); see Comments.

Original entry on oeis.org

1, 2, 3, 6, 9, 15, 25, 40, 65, 106, 171, 277, 449, 726, 1175, 1902, 3077, 4979, 8057, 13036, 21093, 34130, 55223, 89353, 144577, 233930, 378507, 612438, 990945, 1603383, 2594329, 4197712, 6792041, 10989754, 17781795, 28771549, 46553345, 75324894, 121878239
Offset: 0

Views

Author

Clark Kimberling, Jul 16 2022

Keywords

Comments

Suppose that s = (s(n)) and t = (t(n)) are integer sequences. The lower midsequence, m = m(s,t), of s and t is defined by m(n) = floor((s(n) + t(n))/2). The upper midsequence, M = M(s,t), is defined by M(n) = ceiling((s(n) + t(n))/2).
Here, s(n) = F(n+2) and t(n) = L(n+1), for n >= 0, where F = A000045 (Fibonacci numbers) and L = A000032 (Lucas numbers).

Examples

			a(0) = 1 = floor((1+1)/2);
a(1) = 2 = floor((2+3)/2);
a(2) = 3 = floor((3+4)/2).
The Fibonacci and Lucas numbers are interspersed:
1 < 2 < 3 < 4 < 5 < 7 < 8 < 11 < 13 < 18 < 21 < 29 < ...
The midsequences m and M intersperse the ordered union of the Fibonacci and Lucas sequences, A116470, as indicated by the following table:
   F    m    M    L
   1    1    1    1
   2    2    3    3
   3    3    4    4
   5    6    6    7
   8    9   10   11
  13   15   16   18
  21   25   25   29
		

Crossrefs

Programs

  • Mathematica
    Table[Floor[(LucasL[n + 1] + Fibonacci[n + 2])/2], {n, 0, 50}]    (* A355324 *)
    Table[Ceiling[(LucasL[n + 1] + Fibonacci[n + 2])/2], {n, 0, 50}]  (* A355325 *)
  • Python
    from sympy import fibonacci, lucas
    def A355324(n): return fibonacci(n+2)+lucas(n+1)>>1 # Chai Wah Wu, Aug 08 2022

Formula

a(n) = floor((A000045(n+2) + A000032(n+1))/2).
a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-4) - a(n-5) for n >= 5.
G.f.: (1 + x - x^4)/(1 - x - x^2 - x^3 + x^4 + x^5).
G.f.: ((1 + x - x^4)/((-1 + x) (-1 + x + x^2) (1 + x + x^2))).
a(n) = (3*((5 - 4*sqrt(5))*(1 - sqrt(5))^n + (1 + sqrt(5))^n*(5 + 4*sqrt(5)))/2^n + 10*(cos(2*n*Pi/3) - 1))/30. - Stefano Spezia, Jul 17 2022

A355325 Upper midsequence of the Fibonacci numbers (1,2,3,5,8,...) and Lucas numbers (1,3,4,7,11,...); see Comments.

Original entry on oeis.org

1, 3, 4, 6, 10, 16, 25, 41, 66, 106, 172, 278, 449, 727, 1176, 1902, 3078, 4980, 8057, 13037, 21094, 34130, 55224, 89354, 144577, 233931, 378508, 612438, 990946, 1603384, 2594329, 4197713, 6792042, 10989754, 17781796, 28771550, 46553345, 75324895, 121878240
Offset: 0

Views

Author

Clark Kimberling, Jul 16 2022

Keywords

Comments

Suppose that s = (s(n)) and t = (t(n)) are integer sequences. The lower midsequence, m = m(s,t), of s and t is defined by m(n) = floor((s(n) + t(n))/2). The upper midsequence, M = M(s,t), is defined by M(n) = ceiling((s(n) + t(n))/2).
Here, s(n) = F(n+2) and t(n) = L(n+1), for n >= 0, where F = A000045 (Fibonacci numbers) and L = A000032 (Lucas numbers).

Examples

			a(0) = 1 = ceiling((1+1)/2);
a(1) = 3 = ceiling((2+3)/2);
a(2) = 4 = ceiling((3+4)/2).
The Fibonacci and Lucas numbers are interspersed:
1 < 2 < 3 < 4 < 5 < 7 < 8 < 11 < 13 < 18 < 21 < 29 < ...
The midsequences m and M intersperse the ordered union of the Fibonacci and Lucas sequences, A116470, as indicated by the following table:
   F    m    M    L
   1    1    1    1
   2    2    3    3
   3    3    4    4
   5    6    6    7
   8    9   10   11
  13   15   16   18
  21   25   25   29
		

Crossrefs

Programs

  • Mathematica
    Table[Floor[(LucasL[n + 1] + Fibonacci[n + 2])/2], {n, 0, 50}]    (* A355324 *)
    Table[Ceiling[(LucasL[n + 1] + Fibonacci[n + 2])/2], {n, 0, 50}]  (* A355325 *)

Formula

a(n) = ceiling((A000045(n+2) + A000032(n+1))/2).
a(n) = a(n-1) + a(n-2) + a(n-3) - a(n-4) - a(n-5) for n >= 5.
G.f.: (1 + 2 x - 2 x^3 - 2 x^4)/(1 - x - x^2 - x^3 + x^4 + x^5).
G.f.: ((1 + 2 x - 2 x^3 - 2 x^4)/((-1 + x) (-1 + x + x^2) (1 + x + x^2))).
a(n) = (10 + 3*((5 - 4*sqrt(5))*(1 - sqrt(5))^n + (1 + sqrt(5))^n*(5 + 4*sqrt(5)))/2^n - 10*cos(2*n*Pi/3))/30. - Stefano Spezia, Jul 17 2022

A378698 Number of compositions of n into parts whose sizes are Fibonacci or Lucas numbers.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 31, 62, 123, 243, 481, 953, 1887, 3737, 7399, 14652, 29014, 57452, 113767, 225279, 446095, 883352, 1749201, 3463746, 6858864, 13581833, 26894570, 53256275, 105457382, 208825335, 413513204, 818833458, 1621443338, 3210760963, 6357907009
Offset: 0

Views

Author

Davide Rotondo, Dec 04 2024

Keywords

Comments

a(n+1)/a(n) approximate the constant r = 1.9801869...

Crossrefs

Programs

  • PARI
    A116470(n) = if(n<6, n, if(n%2, fibonacci(n\2+3), fibonacci(n\2)+fibonacci(n\2+2)))
    a(max_n) = {Vec(1/(1+sum(k=1,max_n-1, -1*x^A116470(k)))+O(x^max_n)); } \\ Thomas Scheuerle, Dec 04 2024

Formula

G.f.: 1/(1 - Sum_{k>=1} x^A116470(k)). - Thomas Scheuerle, Dec 04 2024
Showing 1-6 of 6 results.