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 43 results. Next

A128587 Row sums of A128586.

Original entry on oeis.org

1, 1, 1, -1, 3, -5, 9, -15, 25, -41, 67, -109, 177, -287, 465, -753, 1219, -1973, 3193, -5167, 8361, -13529, 21891, -35421, 57313, -92735, 150049, -242785, 392835, -635621, 1028457, -1664079, 2692537, -4356617, 7049155, -11405773, 18454929
Offset: 1

Views

Author

Gary W. Adamson, Mar 11 2007

Keywords

Comments

Binomial transform of A128587 = A128588: (1, 2, 4, 6, 10, 16, 26, ...).

Examples

			a(5) = 3 = ( -3, 8, 0, -7, 5).
		

Crossrefs

This is a signed version of A001595. - Franklin T. Adams-Watters, Sep 30 2009
Cf. A000045.

Programs

  • GAP
    List([1..40], n-> (-1)^(n-1)*(2*Fibonacci(n-2)-1)); # G. C. Greubel, Jul 10 2019
  • Magma
    [(-1)^(n-1)*(2*Fibonacci(n-2)-1): n in [1..40]]; // G. C. Greubel, Jul 10 2019
    
  • Mathematica
    Table[(-1)^(n-1)*(2*Fibonacci[n-2] -1), {n, 40}] (* G. C. Greubel, Jul 10 2019 *)
  • PARI
    vector(40, n, f=fibonacci; (-1)^(n-1)*(2*f(n-2)-1)) \\ G. C. Greubel, Jul 10 2019
    
  • Sage
    [(-1)^(n-1)*(2*fibonacci(n-2)-1) for n in (1..40)] # G. C. Greubel, Jul 10 2019
    

Formula

Row sums of triangle A128586, inverse binomial transform of A128588.
From R. J. Mathar, Jun 03 2009: (Start)
a(n) = -2*a(n-1) + a(n-3) = (-1)^n*(1 - A118658(n-1)).
G.f.: x*(1+3*x+3*x^2)/((1+x)*(1+x-x^2)). (End)
a(n+3) = (-1)^n * A001595(n) for all n>=0. - M. F. Hasler and Franklin T. Adams-Watters, Sep 30 2009
a(n) = (-1)^(n-1)*(2*Fibonacci(n-2) - 1). - G. C. Greubel, Jul 10 2019

Extensions

More terms from R. J. Mathar, Jun 03 2009
Duplicate of a formula removed by R. J. Mathar, Oct 23 2009
Deleted certain dangerous or potentially dangerous links. - N. J. A. Sloane, Jan 30 2021

A382843 Length of the long leg in the unique primitive Pythagorean triple (x,y,z) such that (x-y+z)/2 = A000045(n) and its long leg and hypotenuse are consecutive natural numbers.

Original entry on oeis.org

0, 0, 0, 4, 12, 40, 112, 312, 840, 2244, 5940, 15664, 41184, 108112, 283504, 742980, 1946364, 5097624, 13348944, 34953160, 91516920, 239607940, 627323620, 1642389984, 4299890112, 11257351200, 29472278112, 77159668612, 202007027820, 528861900424, 1384579459120
Offset: 0

Views

Author

Keywords

Examples

			Triples begin:
  n=0:     -1,     0,     1;
  n=1:      1,     0,     1;
  n=2:      1,     0,     1;
  n=3:      3,     4,     5.
This sequence gives column 2.
		

Crossrefs

Cf. A000045, A382844 (area), A382845 (sum of the legs), A095122 (semiperimeter), A001595 (short leg).

Formula

a(n) = 2*A000045(n)*(A000045(n) - 1),.

A049112 2-ranks of difference sets constructed from Glynn type I hyperovals.

Original entry on oeis.org

1, 1, 3, 7, 13, 23, 45, 87, 167, 321, 619, 1193, 2299, 4431, 8541, 16463, 31733, 61167, 117903, 227265, 438067, 844401, 1627635, 3137367, 6047469, 11656871, 22469341, 43311047, 83484727, 160921985, 310187099, 597904857, 1152498667
Offset: 1

Views

Author

Christian Krattenthaler (kratt(AT)ap.univie.ac.at)

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,3,7,13];; for n in [5..40] do a[n]:=a[n-1]+a[n-2]+a[n-3] +a[n-4] -1; od; Concatenation([1], a); # G. C. Greubel, Jul 10 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x+x^2+x^3-x^4-2*x^5)/(1-2*x+x^5) )); // G. C. Greubel, Jul 10 2019
    
  • Maple
    L := 1,1,3,7,13: for i from 6 to 140 do l := nops([ L ]): L := L,op(l,[ L ])+op(l-1,[ L ])+op(l-2,[ L ])+op(l-3,[ L ])-1: od: [ L ];
  • Mathematica
    Join[{1,1,3,7}, Table[a[1]=3; a[2]=1; a[3]=3; a[4]=7; a[i]=a[i-1]+a[i-2] +a[i-3]+a[i-4] -1, {i,5,40}]]
    CoefficientList[Series[(1-x+x^2+x^3-x^4-2*x^5)/(1-2*x+x^5), {x,0,40}], x] (* G. C. Greubel, Jul 10 2019 *)
  • PARI
    my(x='x+O('x^40)); Vec((1-x+x^2+x^3-x^4-2*x^5)/(1-2*x+x^5)) \\ G. C. Greubel, Jul 10 2019
    
  • Sage
    ((1-x+x^2+x^3-x^4-2*x^5)/(1-2*x+x^5)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jul 10 2019
    

Formula

G.f.: (1-x+x^2+x^3-x^4-2*x^5)/(1-2*x+x^5).
a(n+1) = a(n) + a(n-1) + a(n-2) + a(n-3) - 1, n >= 5.

A049114 2-ranks of difference sets constructed from Glynn type II hyperovals.

Original entry on oeis.org

1, 1, 5, 7, 21, 37, 89, 173, 383, 777, 1665, 3441, 7277, 15159, 31885, 66645, 139865, 292757, 613823, 1285585, 2694433, 5644609, 11828501, 24782311, 51928773, 108802597, 227978105, 477674813, 1000877759, 2097121497, 4394101857
Offset: 1

Views

Author

Christian Krattenthaler (kratt(AT)ap.univie.ac.at)

Keywords

Crossrefs

Programs

  • GAP
    a:=[1,5,7,21];; for n in [5..40] do a[n]:=a[n-1]+3*a[n-2]-a[n-3] -a[n-4] +1; od; Concatenation([1], a); # G. C. Greubel, Jul 10 2019
  • Magma
    R:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (1-x+x^2-x^3+x^4)/(1-2*x-2*x^2+4*x^3-x^5) )); // G. C. Greubel, Jul 10 2019
    
  • Maple
    L := 1,1,5,7: for i from 5 to 100 do l := nops([ L ]): L := L,op(l,[ L ])+3*op(l-1,[ L ])-op(l-2,[ L ])-op(l-3,[ L ])+1: od: [ L ];
  • Mathematica
    Join[{1,1,5,7}, Table[a[1]=1; a[2]=1; a[3]=5; a[4]=7; a[i]=a[i-1]+ 3*a[i-2]-a[i-3]-a[i-4] +1, {i, 5, 40}]]
    CoefficientList[Series[(1-x+x^2-x^3+x^4)/(1-2*x-2*x^2+4*x^3-x^5), {x, 0, 40}], x] (* G. C. Greubel, Jul 10 2019 *)
  • PARI
    my(x='x+O('x^40)); Vec((1-x+x^2-x^3+x^4)/(1-2*x-2*x^2+4*x^3-x^5)) \\ G. C. Greubel, Jul 10 2019
    
  • Sage
    ((1-x+x^2-x^3+x^4)/(1-2*x-2*x^2+4*x^3-x^5)).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Jul 10 2019
    

Formula

G.f.: (1-x+x^2-x^3+x^4)/(1-2*x-2*x^2+4*x^3-x^5).
a(n+1) = a(n) + 3*a(n-1) - a(n-2) - a(n-3) + 1.

A209421 Triangle of coefficients of polynomials u(n,x) jointly generated with A209422; see the Formula section.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 5, 4, 1, 1, 9, 7, 5, 1, 1, 15, 15, 9, 6, 1, 1, 25, 28, 22, 11, 7, 1, 1, 41, 53, 44, 30, 13, 8, 1, 1, 67, 97, 91, 63, 39, 15, 9, 1, 1, 109, 176, 179, 140, 85, 49, 17, 10, 1, 1, 177, 315, 349, 291, 201, 110, 60, 19, 11, 1, 1, 287, 559, 667, 601, 437, 275, 138, 72, 21, 12, 1, 1
Offset: 1

Views

Author

Clark Kimberling, Mar 09 2012

Keywords

Comments

For a discussion and guide to related arrays, see A208510.

Examples

			First five rows:
  1
  1 1
  3 1 1
  5 4 1 1
  9 7 5 1 1
First three polynomials v(n,x): 1, 1 + x, 3 + x + x^2.
		

Crossrefs

Cf. A001595 (column 1), A209422, A208510, A212804.

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + v[n - 1, x];
    v[n_, x_] := u[n - 1, x] + v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A209421 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A209422 *)
    CoefficientList[CoefficientList[Series[(1 - t + t^2)/((1 - t)*(1 - (x + 1)*t + (x - 1)*t^2)), {t, 0, 10}], t], x] // Flatten (* G. C. Greubel, Jan 03 2018 *)

Formula

u(n,x) = x*u(n-1,x) + v(n-1,x),
v(n,x) = u(n-1,x) + v(n-1,x) +1,
where u(1,x) = 1, v(1,x) = 1.
Riordan array (f(z), z*g(z)) where f(z) = (1 - z + z^2)/(1 - 2*z + z^3) is the o.g.f. for A001595 and g(z) = (1 - z)/(1 - z - z^2) is the o.g.f. for A212804, a variant of the Fibonacci numbers. - Peter Bala, Dec 30 2015
G.f.: (1 + (1 - x)*t - t^2)/((1 - t)*(1 - (x + 1)*t + (x - 1)*t^2)) = 1 + (1+x)*t + (3+x+x^2)*t^2 + ... . - G. C. Greubel, Jan 03 2018

A209769 Triangle of coefficients of polynomials u(n,x) jointly generated with A209770; see the Formula section.

Original entry on oeis.org

1, 1, 2, 3, 5, 3, 5, 12, 11, 5, 9, 26, 34, 24, 8, 15, 53, 88, 86, 48, 13, 25, 104, 210, 258, 200, 93, 21, 41, 198, 470, 695, 680, 440, 175, 34, 67, 369, 1007, 1737, 2043, 1671, 929, 323, 55, 109, 676, 2085, 4107, 5625, 5529, 3895, 1901, 587, 89, 177
Offset: 1

Views

Author

Clark Kimberling, Mar 15 2012

Keywords

Comments

Column 1: A001595
Row n ends with F(n+1), where F=A000045 (Fibonacci numbers).
Row sums: 1,3,11,33,101,303,911,2733,... A081250
Alternating row sums: 1,-1,1,-1,1,-1,... A033999
For a discussion and guide to related arrays, see A208510.

Examples

			First five rows:
1
1...2
3...5....3
5...12...11...5
9...26...34...24...8
First three polynomials u(n,x): 1, 1 + 2x, 3 + 5x + 3x^2.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + (x + 1)*v[n - 1, x];
    v[n_, x_] := (x + 1)*u[n - 1, x] + v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A209769 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A209770 *)

Formula

u(n,x)=x*u(n-1,x)+(x+1)*v(n-1,x),
v(n,x)=(x+1)*u(n-1,x)+v(n-1,x)+1,
where u(1,x)=1, v(1,x)=1.

A209770 Triangle of coefficients of polynomials v(n,x) jointly generated with A209769; see the Formula section.

Original entry on oeis.org

1, 3, 1, 5, 4, 2, 9, 12, 10, 3, 15, 29, 33, 19, 5, 25, 64, 93, 77, 37, 8, 41, 132, 234, 251, 171, 69, 13, 67, 261, 548, 719, 629, 362, 127, 21, 109, 500, 1216, 1884, 2004, 1482, 742, 230, 34, 177, 936, 2592, 4628, 5784, 5196, 3342, 1482, 412, 55, 287
Offset: 1

Views

Author

Clark Kimberling, Mar 15 2012

Keywords

Comments

Column 1: A001595
Row n ends with F(n), where F=A000045, the Fibonacci numbers.
Row sums: 1,4,11,34,101,304,911,2734,... A060925
Alternating row sums: 1,2,3,4,5,6,7,.... A000027
For a discussion and guide to related arrays, see A208510.

Examples

			First five rows:
1
3....1
5....4....2
9....12...10...3
15...29...33...19...5
First three polynomials v(n,x): 1, 3 + x , 5 + 4x + 2x^2.
		

Crossrefs

Programs

  • Mathematica
    u[1, x_] := 1; v[1, x_] := 1; z = 16;
    u[n_, x_] := x*u[n - 1, x] + (x + 1)*v[n - 1, x];
    v[n_, x_] := (x + 1)*u[n - 1, x] + v[n - 1, x] + 1;
    Table[Expand[u[n, x]], {n, 1, z/2}]
    Table[Expand[v[n, x]], {n, 1, z/2}]
    cu = Table[CoefficientList[u[n, x], x], {n, 1, z}];
    TableForm[cu]
    Flatten[%]    (* A209769 *)
    Table[Expand[v[n, x]], {n, 1, z}]
    cv = Table[CoefficientList[v[n, x], x], {n, 1, z}];
    TableForm[cv]
    Flatten[%]    (* A209770 *)

Formula

u(n,x)=x*u(n-1,x)+(x+1)*v(n-1,x),
v(n,x)=(x+1)*u(n-1,x)+v(n-1,x)+1,
where u(1,x)=1, v(1,x)=1.

A259598 Number of representations of n as u(h) + v(k), where u = A000201 (lower Wythoff numbers), v = A001950 (upper Wythoff numbers), h>=1, k>=1.

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 0, 3, 1, 2, 4, 0, 4, 4, 1, 6, 2, 4, 7, 0, 8, 4, 4, 9, 1, 8, 8, 2, 11, 4, 7, 12, 0, 12, 9, 4, 14, 4, 10, 14, 1, 16, 8, 8, 17, 2, 15, 14, 4, 19, 7, 12, 20, 0, 21, 12, 9, 22, 4, 18, 19, 4, 24, 10, 14, 25, 1, 24, 18, 8, 27, 8, 19, 26, 2, 29, 15
Offset: 1

Views

Author

Clark Kimberling, Jul 22 2015

Keywords

Comments

Three conjectures. The numbers that are not a sum u(h) + v(k) are (1,2,4,7,12, ...) = A000071 = -1 + Fibonacci numbers. The numbers that have exactly one such representation are (3, 5, 9, 15, 25, 41, ...) = A001595. The numbers that have exactly two such representations are (6, 10, 17, 28, 46, ...) = A001610.

Crossrefs

Programs

  • Mathematica
    r = GoldenRatio; z = 500;
    u[n_] := u[n] = Floor[n*r]; v[n_] := v[n] = Floor[n*r^2];
    s[m_, n_] := s[m, n] = u[m] + v[n]; t = Table[s[m, n], {m, 1, z}, {n, 1, z}];
    w = Flatten[Table[Count[Flatten[t], n], {n, 1, z/5}]]  (* A259598 *)
  • PARI
    {a(n) = my(phi = (1 + sqrt(5))/2, WL=1, WU=1);
    WL = sum(m=1, floor(n/phi)+1, x^floor(m*phi) +x*O(x^n));
    WU = sum(m=1, floor(n/phi^2)+1, x^floor(m*phi^2) +x*O(x^n));
    polcoeff(WL*WU, n)}
    for(n=1, 120, print1(a(n), ", ")) \\ Paul D. Hanna, Dec 02 2017

Formula

G.f.: [Sum_{n>=1} x^floor(n*phi)] * [Sum_{n>=1} x^floor(n*phi^2)], where phi = (1+sqrt(5))/2. - Paul D. Hanna, Dec 02 2017
G.f.: [Sum_{n>=1} x^A000201(n)] * [Sum_{n>=1} x^A001950(n)], where A000201 and A001950 are the lower and upper Wythoff sequences, respectively. - Paul D. Hanna, Dec 02 2017

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

A131240 T(n,k) = 2*A046854(n,k) - I.

Original entry on oeis.org

1, 2, 1, 2, 2, 1, 2, 4, 2, 1, 2, 4, 6, 2, 1, 2, 6, 6, 8, 2, 1, 2, 6, 12, 8, 10, 2, 1, 2, 8, 12, 20, 10, 12, 2, 1, 2, 8, 20, 20, 30, 12, 14, 2, 1, 2, 10, 20, 40, 30, 42, 14, 16, 2, 1, 2, 10, 30, 40, 70, 42, 56, 16, 18, 2, 1, 2, 12, 30, 70, 70, 112, 56, 72, 18, 20, 2, 1
Offset: 0

Views

Author

Gary W. Adamson, Jun 21 2007

Keywords

Comments

Row sums = A001595: (1, 3, 5, 9, 15, 25, 41, 67, ...).
A131241 = 3*A046854 - 2*I.

Examples

			First few rows of the triangle:
  1;
  2, 1;
  2, 2,  1;
  2, 4,  2, 1;
  2, 4,  6, 2,  1;
  2, 6,  6, 8,  2, 1;
  2, 6, 12, 8, 10, 2, 1;
  ...
		

Crossrefs

Programs

  • GAP
    T:= function(n,k)
        if k=n then return 1;
        else return 2*Binomial(Int((n+k)/2), k);
        fi;
      end;
    Flat(List([0..12], n-> List([0..n], k-> T(n,k)))); # G. C. Greubel, Jul 12 2019
  • Magma
    [k eq n select 1 else 2*Binomial(Floor((n+k)/2), k): k in [0..n], n in [0..12]]; // G. C. Greubel, Jul 12 2019
    
  • Mathematica
    Table[If[k==n, 1, 2*Binomial[Floor[(n+k)/2], k]], {n, 0, 12}, {k, 0, n}]//Flatten (* G. C. Greubel, Jul 12 2019 *)
  • PARI
    T(n,k) = if(k==n, 1, 2*binomial((n+k)\2, k));
    
  • Sage
    def T(n, k):
        if (k==n): return 1
        else: return 2*binomial(floor((n+k)/2), k)
    [[T(n, k) for k in (0..n)] for n in (0..12)] # G. C. Greubel, Jul 12 2019
    

Formula

T(n,k) = 2*A046854(n,k) - Identity matrix, where A046854 = Pascal's triangle with repeats by columns.

Extensions

More terms added by G. C. Greubel, Jul 12 2019
Previous Showing 21-30 of 43 results. Next