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

A192872 Constant term in the reduction by (x^2 -> x+1) of the polynomial p(n,x) given in Comments.

Original entry on oeis.org

1, 0, 3, 4, 13, 30, 81, 208, 547, 1428, 3741, 9790, 25633, 67104, 175683, 459940, 1204141, 3152478, 8253297, 21607408, 56568931, 148099380, 387729213, 1015088254, 2657535553, 6957518400
Offset: 0

Views

Author

Clark Kimberling, Jul 11 2011

Keywords

Comments

The polynomial p(n,x) is defined by p(0,x)=1, p(1,x)=x, and p(n,x) = x*p(n-1,x) + (x^2)*p(n-1,x) + 1. The resulting sequence typifies a general class which we shall describe here. Suppose that u,v,a,b,c,d,e,f are numbers used to define these polynomials:
...
q(x) = x^2
s(x) = u*x + v
p(0,x) = a, p(1,x) = b*x + c
p(n,x) = d*x*p(n-1,x) + e*(x^2)*p(n-2,x) + f.
...
We shall assume that u is not 0 and that {d,e} is not {0}. The reduction of p(n,x) by the repeated substitution q(x)->s(x), as defined and described at A192232 and A192744, has the form h(n)+k(n)*x. The numerical sequences h and k are, formally, linear recurrence sequences of order 5. The second Mathematica program below shows initial terms and the recurrence coefficients, which are too long to be included here, which imply these properties:
(1) The numbers a,b,c,f affect initial terms but not the recurrence coefficients, which depend only on u,v,d,e.
(2) If v=0 or e=0, the order of recurrence is <= 3.
(3) If v=0 and e=0, the order of recurrence is 2, and the coefficients are 1+d*u and d*u.
(See A192904 for similar results for other p(n,x).)
...
Examples:
u v a b c d e f seq h.....seq k
1 1 1 2 0 1 1 0 -A121646..A059929
1 1 1 3 0 1 1 0 A128533...A081714
1 1 2 1 0 1 1 0 A081714...A001906
1 1 1 1 1 1 1 0 A000045...A001906
1 1 2 1 1 1 1 0 A129905...A192879
1 1 1 2 1 1 1 0 A061646...A079472
1 1 1 1 0 1 1 1 A192872...A192873
1 1 1 1 1 2 1 1 A192874...A192875
1 1 1 1 1 2 1 1 A192876...A192877
1 1 1 1 1 1 2 1 A192880...A192882
1 1 1 1 1 1 1 1 A166536...A064831
The terms of several of these sequences are products of Fibonacci numbers (A000045), or Fibonacci numbers and Lucas numbers (A000032).

Examples

			The coefficients in all the polynomials p(n,x) are Fibonacci numbers (A000045).  The first six and their reductions:
p(0,x) = 1 -> 1
p(1,x) = x -> x
p(2,x) = 1 + 2*x^2 -> 3 + 2*x
p(3,x) = 1 + x + 3*x^3 -> 4 + 7*x
p(4,x) = 1 + x + 2*x^2 + 5*x^4 -> 13 + 18*x
p(5,x) = 1 + x + 2*x^2 + 3*x^3 + 8*x^5 -> 30 + 49*x
		

Crossrefs

Cf. A192232, A192744, A192873, A192908 (sums of adjacent terms).

Programs

  • GAP
    a:=[1,0,3,4];; for n in [5..30] do a[n]:=3*a[n-1]-3*a[n-3]+a[n-4]; od; a; # G. C. Greubel, Jan 06 2019
  • Magma
    m:=30; R:=PowerSeriesRing(Integers(), m); Coefficients(R!( (2*x-1)*(x^2-x+1)/((x-1)*(1+x)*(x^2-3*x +1)) )); // G. C. Greubel, Jan 06 2019
    
  • Mathematica
    (* First program *)
    q = x^2; s = x + 1; z = 26;
    p[0, x_] := 1; p[1, x_] := x;
    p[n_, x_] := p[n - 1, x]*x + p[n - 2, x]*x^2 + 1;
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] := FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}] (* A192872 *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}] (* A192873 *)
    (* End of 1st program *)
    (* ******************************************** *)
    (* Second program: much more general *)
    (* u = 1; v = 1; a = 1; b = 1; c = 0; d = 1; e = 1; f = 1; Nine degrees of freedom for user; shown values generate A192872. *)
    q = x^2; s = u*x + v; z = 11;
    (* will apply reduction (x^2 -> u*x+v) to p(n,x) *)
    p[0, x_] := a; p[1, x_] := b*x + c;
    (* initial values of polynomial sequence p(n,x) *)
    p[n_, x_] := d*x*p[n - 1, x] + e*(x^2)*p[n - 2, x] + f;
    (* recurrence for p(n,x) *)
    Table[Expand[p[n, x]], {n, 0, 7}]
    reduce[{p1_, q_, s_, x_}] := FixedPoint[(s PolynomialQuotient @@ #1 + PolynomialRemainder @@ #1 &)[{#1, q, x}] &, p1]
    t = Table[reduce[{p[n, x], q, s, x}], {n, 0, z}];
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, z}];
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, z}];
    Simplify[FindLinearRecurrence[u1]] (* for 0-sequence *)
    Simplify[FindLinearRecurrence[u2]] (* for 1-sequence *)
    u1 = Table[Coefficient[Part[t, n], x, 0], {n, 1, 4}]
    (* initial values for 0-sequence *)
    u2 = Table[Coefficient[Part[t, n], x, 1], {n, 1, 4}]
    (* initial values for 1-sequence *)
    LinearRecurrence[{3,0,-3,1},{1,0,3,4},26] (* Ray Chandler, Aug 02 2015 *)
  • PARI
    my(x='x+O('x^30)); Vec((2*x-1)*(x^2-x+1)/((x-1)*(1+x)*(x^2-3*x +1))) \\ G. C. Greubel, Jan 06 2019
    
  • Sage
    ((2*x-1)*(x^2-x+1)/((x-1)*(1+x)*(x^2-3*x +1))).series(x, 30).coefficients(x, sparse=False) # G. C. Greubel, Jan 06 2019
    

Formula

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

A236428 a(n) = F(n+1)^2 + F(n+1)*F(n) - F(n)^2, where F = A000045.

Original entry on oeis.org

1, 1, 5, 11, 31, 79, 209, 545, 1429, 3739, 9791, 25631, 67105, 175681, 459941, 1204139, 3152479, 8253295, 21607409, 56568929, 148099381, 387729211, 1015088255, 2657535551, 6957518401, 18215019649, 47687540549, 124847601995, 326855265439, 855718194319
Offset: 0

Views

Author

Richard R. Forberg, Jan 25 2014

Keywords

Comments

(a(n) + a(n+1))/2 = F(2n+2).
a(n) = -a(-n-1), using the negative Fibonacci values.
First differences equal 2*A059929.
Partial sums equal A192873.
Unlike Fibonacci, the divisibility of a(n) by the primes is quite limited, specifically to p = 5, 11, 19, 31, 59, 71, 79, 109, ... where those after 5 are only a subset of primes congruent to {1,4} mod 5.
Values of a(n) mod p, for all primes p exhibit repeating pattern cycles of length k = (p-1)/m or (p+1)/m (except p = 5), based on whether p is congruent to {1,4} mod 5 or {2,3} mod 5. For p = 5, k = 2p = 10. Only the slightest similarity exists here with Fibonacci: there are formulas like this for a cycle length k, but for Fibonacci those are "divisibility cycles" for prime p, not the "pattern cycles" on mod p, and the m values differ for many primes, creating different cycle lengths for the same p.
a(n) has the property: a(k/2 + i) mod p + a(k/2 - 1 - i) mod p = p or 0, for all primes p, and all i 0 <= i <= k/2, in every cycle of length k. Thus, when plotted, the lower and upper halves of a every cycle have an inverted (i.e., flipped) symmetry.
For some primes (e.g., 13, 17, 37, 53, 61, 89, 97) each half-cycle (of length k/2) is internally symmetric (i.e., the second quarter-cycle is a mirror image of the first quarter cycle, and the fourth is a mirror image of the third, on each side of some value at k/4), while the flipped symmetry still holds for the upper and lower halves. See example for p = 61, with k = 30 in pdf file below.
No such symmetries on mod p, of either type, exist for Fibonacci.
a(n) is also (apart from sign) the determinant of a 2 X 2 matrix of squares of successive Fibonacci numbers: a(n) = (-1)^(n)*(F(n+2)^2*F(n-1)^2 -F(n)^2*F(n+1)^2). - R. M. Welukar, Aug 30 2014
For n>1 a(n) is the ceiling of the maximum area of a quadrilateral having sides of length in increasing order F(n), F(n+1), L(n), and L(n+1) with L(n)=A000032(n). - J. M. Bergot, Jan 19 2016
For n>1 a(n) is the numerator of the continued fraction [1, 1, ... 1, 2, 1, 1, ... 1, 2] with n-2 1's before each 2. - Greg Dresden and Kevin Zhanming Zheng, Aug 16 2020
a(n) is the number of edge covers in the rocket graph R_{3,n+1,n}. A rocket graph R_{m,i,j} is a m-cycle with two paths attached to adjacent vertices of the cycle, which have lengths i and j respectively. This is similar to a tadpole graph but with two tails. - Bridget Rozema, Oct 09 2024

Crossrefs

Cf. similar sequences of the type k*F(n)*F(n+1)+(-1)^n listed in A264080.

Programs

  • Magma
    [Fibonacci(n+1)^2+Fibonacci(n+1)*Fibonacci(n)- Fibonacci(n)^2: n in [0..30]]; // Vincenzo Librandi, Jan 20 2016
    
  • Magma
    F:=Fibonacci; [F(n+1)^2+F(n)*F(n-1): n in [0..30]]; // Bruno Berselli, Feb 15 2017
  • Mathematica
    a[n_] := Fibonacci[n+1]^2 + Fibonacci[n+1]*Fibonacci[n] - Fibonacci[n]^2; Table[a[n], {n, 0, 26}] (* Jean-François Alcover, Feb 27 2014 *)
    LinearRecurrence[{2, 2, -1}, {1, 1, 5}, 40] (* Vincenzo Librandi, Jan 20 2016 *)
  • PARI
    F=fibonacci;
    a(n)=F(n+1)^2 + F(n+1)*F(n) - F(n)^2;
    vector(33,n,a(n-1)) \\ Joerg Arndt, Feb 23 2014
    
  • PARI
    Vec((x^2-x+1)/((x+1)*(x^2-3*x+1)) + O(x^100)) \\ Colin Barker, Dec 20 2014
    
  • PARI
    a(n) = round((2^(-n)*(3*(-2)^n-(3-sqrt(5))^n*(-1+sqrt(5))+(1+sqrt(5))*(3+sqrt(5))^n))/5) \\ Colin Barker, Sep 28 2016
    

Formula

a(n) = A001654(n) + A226205(n+1).
G.f.: (x^2 - x + 1)/((x + 1)*(x^2 - 3*x + 1)). - Joerg Arndt, Feb 23 2014
a(n) = (2*Lucas(2*n+1) + 3*(-1)^n)/5. - Ralf Stephan, Feb 27 2014
a(n) = 2*a(n-1) + 2*a(n-2)-a(n-3). - Colin Barker, Dec 20 2014
a(n) = F(n-1)*F(n+2) + F(n)*F(n+1). - J. M. Bergot, Dec 20 2014
a(n) = 2*F(n)*F(n+1) + (-1)^n. - Bruno Berselli, Oct 30 2015
a(n) = F(2*n+1) - F(n-1)^2 +(-1)^n for n>0. - J. M. Bergot, Jan 19 2016
a(n) = (2^(-n)*(3*(-2)^n-(3-sqrt(5))^n*(-1+sqrt(5))+(1+sqrt(5))*(3+sqrt(5))^n))/5. - Colin Barker, Sep 28 2016
a(n) = F(n+1)^2 + F(n)*F(n-1). See also A099016, tenth formula. - Bruno Berselli, Feb 15 2017
2*a(n) = L(n)*L(n+1) - F(n)*F(n+1), where L = A000032. - Bruno Berselli, Sep 27 2017
Showing 1-2 of 2 results.