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

A022308 a(n) = a(n-1) + a(n-2) + 1 for n>1, a(0)=0, a(1)=3.

Original entry on oeis.org

0, 3, 4, 8, 13, 22, 36, 59, 96, 156, 253, 410, 664, 1075, 1740, 2816, 4557, 7374, 11932, 19307, 31240, 50548, 81789, 132338, 214128, 346467, 560596, 907064, 1467661, 2374726, 3842388, 6217115, 10059504, 16276620, 26336125, 42612746, 68948872, 111561619
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Formula

G.f.: x*(3-2*x) / (x^3-2*x+1).
a(n) = 2*A000045(n) + A000045(n+2) - 1 = A000285(n)-1.
a(n) = 2*a(n-1) - a(n-3) for n>=3. - Ron Knott, Aug 25 2006
a(n) = (3*A000032(n) - A000045(n) - 2)/2. - Vladimir Joseph Stephan Orlovsky, Feb 02 2012
a(n) = 4*F(n) + F(n-1) - 1, where F = A000045. - Bruno Berselli, Feb 20 2017
a(n) = (-10 + (5-7*sqrt(5))*((1-sqrt(5))/2)^n + ((1+sqrt(5))/2)^n*(5+7*sqrt(5))) / 10. - Colin Barker, Feb 20 2017

A022318 a(n) = a(n-1) + a(n-2) + 1, with a(0) = 1 and a(1) = 4.

Original entry on oeis.org

1, 4, 6, 11, 18, 30, 49, 80, 130, 211, 342, 554, 897, 1452, 2350, 3803, 6154, 9958, 16113, 26072, 42186, 68259, 110446, 178706, 289153, 467860, 757014, 1224875, 1981890, 3206766, 5188657, 8395424
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A122195.

Programs

  • Mathematica
    LinearRecurrence[{2,0,-1}, {1,4,6}, 50] (* G. C. Greubel, Aug 25 2017 *)
  • PARI
    x='x+O('x^50); Vec((1+2*x-2*x^2)/((1-x)*(1-x-x^2))) \\ G. C. Greubel, Aug 25 2017

Formula

From Ron Knott, Aug 25 2006: (Start)
a(n) = 2*A000045(n+2) + A000045(n) - 1.
G.f.: (1+2*x-2*x^2)/((1-x)*(1-x-x^2)).
a(0)=1, a(1)=4, a(2)=6, a(n) = 2*a(n-1) - a(n-3). (End)
a(n) - a(n-1) = A013655(n-1). - R. J. Mathar, May 06 2014

A022406 a(0)=3, a(1)=7; thereafter a(n) = a(n-1) + a(n-2) + 1.

Original entry on oeis.org

3, 7, 11, 19, 31, 51, 83, 135, 219, 355, 575, 931, 1507, 2439, 3947, 6387, 10335, 16723, 27059, 43783, 70843, 114627, 185471, 300099, 485571, 785671, 1271243, 2056915, 3328159, 5385075, 8713235, 14098311, 22811547, 36909859, 59721407, 96631267, 156352675
Offset: 0

Views

Author

Keywords

Comments

a(n) is the minimum number of nodes required for a full binary AVL tree of height n+1 whose root node has a balance factor of 0. - Sumukh Patel, Jun 24 2022

Crossrefs

Cf. A000045, A022087, A122195. See A022403 for a very similar sequence.

Programs

Formula

a(n) = 4*A000045(n+2) - 1. - Ron Knott, Aug 25 2006
From R. J. Mathar, May 28 2008: (Start)
a(n) = A022403(n+1).
O.g.f.: (3+x-3*x^2)/((1-x)*(1-x-x^2)).
a(n+1) - a(n) = A022087(n+1). (End)
a(n) = (2^(-n)*(-5*2^n + (10-6*sqrt(5))*(1-sqrt(5))^n + 2*(1+sqrt(5))^n*(5+3*sqrt(5)))) / 5. - Colin Barker, Mar 02 2018
E.g.f.: 4*exp(x/2)*(5*cosh(sqrt(5)*x/2) + 3*sqrt(5)*sinh(sqrt(5)*x/2))/5 - exp(x). - Stefano Spezia, Feb 01 2025

A122194 Numbers that are the sum of exactly two sets of Fibonacci numbers.

Original entry on oeis.org

3, 5, 6, 9, 10, 15, 17, 25, 28, 41, 46, 67, 75, 109, 122, 177, 198, 287, 321, 465, 520, 753, 842, 1219, 1363, 1973, 2206, 3193, 3570, 5167, 5777, 8361, 9348, 13529, 15126, 21891, 24475, 35421, 39602, 57313, 64078, 92735, 103681, 150049, 167760, 242785
Offset: 1

Views

Author

Ron Knott, Aug 25 2006

Keywords

Examples

			a(1)=3 as 3 is the sum of just 2 Fibonacci sets {3=Fibonacci(4)} and {1=Fibonacci(2), 2=Fibonacci(3)};
a(2)=5 as 5 is sum of Fibonacci sets {5} and {2,3} only.
		

Crossrefs

Programs

  • GAP
    a:= function(n)
        if n mod 2=0 then return 2*Fibonacci(Int((n+6)/2)) -1;
        else return Lucas(1,-1, Int((n+5)/2))[2] -1;
        fi;
      end;
    List([1..50], n-> a(n) ); # G. C. Greubel, Jul 13 2019
  • Magma
    f:=Floor; [(n mod 2) eq 0 select 2*Fibonacci(f((n+6)/2))-1 else Lucas(f((n+5)/2))-1: n in [1..50]]; // G. C. Greubel, Jul 13 2019
    
  • Maple
    fib:= combinat[fibonacci]:
    lucas:=n->fib(n-1)+fib(n+1):
    a:=n -> if n mod 2 = 0 then 2 *fib(n/2+3) -1 else lucas((n+1)/2+2)-1 fi:
    seq(a(n), n=1..50);
  • Mathematica
    LinearRecurrence[{1, 1, -1, 1, -1}, {3, 5, 6, 9, 10, 15}, 40] (* Vincenzo Librandi, Jul 25 2017 *)
    Table[If[Mod[n,2]==0, 2*Fibonacci[(n+6)/2]-1, LucasL[(n+5)/2]-1], {n,50}] (* G. C. Greubel, Jul 13 2019 *)
  • PARI
    vector(50, n, f=fibonacci; if(n%2==0, 2*f((n+6)/2)-1, f((n+7)/2) + f((n+3)/2)-1)) \\ G. C. Greubel, Jul 13 2019
    
  • Sage
    def a(n):
        if (mod(n,2)==0): return 2*fibonacci((n+6)/2) - 1
        else: return lucas_number2((n+5)/2, 1,-1) -1
    [a(n) for n in (1..50)] # G. C. Greubel, Jul 13 2019
    

Formula

a(2n-1) = A000032(n+2) - 1,
a(2n) = 2*A000045(n+3) - 1.
a(2n-1) = A001610(n+2), a(2n) = A001595(n+2).
a(1)=3, a(2)=5, a(3)=6, a(4)=9, a(n) = a(n-2) + a(n-4) + 1, n > 4.
G.f.: (3 + 2*x - 2*x^2 + x^3 - 3*x^4)/(1-x-x^2+x^3-x^4+x^5).
a(n) = A272632(n)-1. - R. J. Mathar, Jan 13 2023
Showing 1-4 of 4 results.