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 11-20 of 27 results. Next

A098790 a(n) = 2*a(n-1) + a(n-2) + 1, a(0) = 1, a(1) = 2.

Original entry on oeis.org

1, 2, 6, 15, 37, 90, 218, 527, 1273, 3074, 7422, 17919, 43261, 104442, 252146, 608735, 1469617, 3547970, 8565558, 20679087, 49923733, 120526554, 290976842, 702480239, 1695937321, 4094354882, 9884647086, 23863649055, 57611945197
Offset: 0

Views

Author

Creighton Dement, Oct 30 2004

Keywords

Comments

Previous name was: a(n) = A048739(n) - A000129(n).
Partial sums of Pell numbers A000129 except omit next-to-last Pell number. E.g., 37 = 0+1+2+5+12+29 - 12.

References

  • M. Bicknell-Johnson and G. E. Bergum, The Generalized Fibonacci Numbers {C(n)}, C(n)=C(n-1)+C(n-2)+K, Applications of Fibonacci Numbers, 1986, pp. 193-205.

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[1] = 2; a[n_] := a[n] = 2a[n - 1] + a[n - 2] + 1; Table[ a[n], {n, 0, 28}] (* Robert G. Wilson v, Nov 04 2004 *)
    LinearRecurrence[{3,-1,-1},{1,2,6},31] (* Harvey P. Dale, Oct 15 2011 *)
    CoefficientList[Series[(x^2 - x + 1)/((1 - x) (1 - 2 x - x^2)), {x, 0, 40}], x] (* Vincenzo Librandi, Aug 14 2014 *)

Formula

a(n) = 2*a(n-1) + a(n-2) + 1, a(0) = 1, a(1) = 2.
G.f.: (x^2-x+1)/((1-x)(1-2x-x^2)).
a(n+1) = - A024537(n+1) + 2*A048739(n+1) - 2*A048739(n).
a(n) = - A024537(n) + A052542(n+1).
Partial sums of A074323. - Paul Barry, Mar 11 2007
a(n) = (sqrt(2)+1)^n*(3/4+sqrt(2)/4)+(sqrt(2)-1)^n*(3/4-sqrt(2)/4)*(-1)^n-1/2; - Paul Barry, Mar 11 2007
a(0)=1, a(1)=2, a(2)=6, a(n)=3*a(n-1)-a(n-2)-a(n-3). [Harvey P. Dale, Oct 15 2011]
a(2*n) = A124124(2*n+1). - Hermann Stamm-Wilbrandt, Aug 03 2014
a(2*n+1) = A006451(2*n+1). - Hermann Stamm-Wilbrandt, Aug 26 2014
a(n) = 7*a(n-2) - 7*a(n-4) + a(n-6), for n>5. - Hermann Stamm-Wilbrandt, Aug 26 2014
2*a(n) = A135532(n+1)-1. - R. J. Mathar, Jan 13 2023

Extensions

More terms from Robert G. Wilson v, Nov 04 2004
Definition edited by N. J. A. Sloane, Aug 03 2014
New name from existing formula by Joerg Arndt, Aug 13 2014

A119016 Numerators of "Farey fraction" approximations to sqrt(2).

Original entry on oeis.org

1, 0, 1, 2, 3, 4, 7, 10, 17, 24, 41, 58, 99, 140, 239, 338, 577, 816, 1393, 1970, 3363, 4756, 8119, 11482, 19601, 27720, 47321, 66922, 114243, 161564, 275807, 390050, 665857, 941664, 1607521, 2273378, 3880899, 5488420, 9369319, 13250218, 22619537, 31988856
Offset: 0

Views

Author

Joshua Zucker, May 08 2006

Keywords

Comments

"Add" (meaning here to add the numerators and add the denominators, not to add the fractions) 1/0 to 1/1 to make the fraction bigger: 2/1. Now 2/1 is too big, so add 1/1 to make the fraction smaller: 3/2, 4/3. Now 4/3 is too small, so add 3/2 to make the fraction bigger: 7/5, 10/7, ... Because the continued fraction for sqrt(2) is all 2s, it will always take exactly two terms here to switch from a number that's bigger than sqrt(2) to one that's less. a(n+2) = A082766(n).
a(2n) are the interleaved values of m such that 2*m^2-2 and 2*m^2+2 are squares, respectively; a(2n+1) are the corresponding integer square roots. - Richard R. Forberg, Aug 19 2013
Apart from the first two terms, this is the sequence of numerators of the convergents of the continued fraction expansion sqrt(2) = 1/(1 - 1/(2 + 1/(1 - 1/(2 + 1/(1 - ....))))). - Peter Bala, Feb 02 2017

Examples

			The fractions are 1/0, 0/1, 1/1, 2/1, 3/2, 4/3, 7/5, 10/7, 17/12, ...
		

Crossrefs

Cf. A097545, A097546 gives the similar sequence for Pi. A119014, A119015 gives the similar sequence for e. A002965 gives the denominators for this sequence. Also very closely related to A001333, A052542 and A000129.
See A082766 for another version.

Programs

  • Maple
    f:= gfun:-rectoproc({a(n+4)=2*a(n+2) +a(n),a(0)=1,a(1)=0,a(2)=1,a(3)=2}, a(n), remember):
    map(f, [$0..100]); # Robert Israel, Jun 10 2015
  • Mathematica
    f[x_, n_] := (m = Floor[x]; f0 = {m, m+1/2, m+1}; r = ({a___, b_, c_, d___} /; b < x < c) :> {b, (Numerator[b] + Numerator[c]) / (Denominator[b] + Denominator[c]), c}; Join[{m, m+1}, NestList[# /. r &, f0, n-3][[All, 2]]]); Join[{1, 0 }, f[Sqrt[2], 38]] // Numerator (* Jean-François Alcover, May 18 2011 *)
    LinearRecurrence[{0, 2, 0, 1}, {1, 0, 1, 2}, 40] (* and *) t = {1, 2}; Do[AppendTo[t, t[[-2]] + t[[-1]]]; AppendTo[t, t[[-3]] + t[[-1]]], {n, 30}]; t (* Vladimir Joseph Stephan Orlovsky, Feb 13 2012 *)
    a0 := LinearRecurrence[{2, 1}, {1, 1}, 20]; (*     A001333 *)
    a1 := LinearRecurrence[{2, 1}, {0, 2}, 20]; (* 2 * A000129 *)
    Flatten[MapIndexed[{a0[[#]],a1[[#]]} &, Range[20]]] (* Gerry Martens, Jun 09 2015 *)
  • PARI
    x='x+O('x^50); Vec((1 - x^2 + 2*x^3)/(1 - 2*x^2 - x^4)) \\ G. C. Greubel, Oct 20 2017

Formula

From Joerg Arndt, Feb 14 2012: (Start)
a(0) = 1, a(1) = 0, a(2n) = a(2n-1) + a(2n-2), a(2n+1) = a(2n) + a(2n-2).
G.f.: (1 - x^2 + 2*x^3)/(1 - 2*x^2 - x^4). (End)
a(n) = 1/4*(1-(-1)^n)*(-2+sqrt(2))*(1+sqrt(2))*((1-sqrt(2))^(1/2*(n-1))-(1+sqrt(2))^(1/2*(n-1)))+1/4*(1+(-1)^n)*((1-sqrt(2))^(n/2)+(1+sqrt(2))^(n/2)). - Gerry Martens, Nov 04 2012
a(2n) = A001333(n). a(2n+1) = A052542(n) for n>0. - R. J. Mathar, Feb 05 2024

A193737 Mirror of the triangle A193736.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 2, 4, 3, 1, 3, 8, 8, 4, 1, 5, 15, 19, 13, 5, 1, 8, 28, 42, 36, 19, 6, 1, 13, 51, 89, 91, 60, 26, 7, 1, 21, 92, 182, 216, 170, 92, 34, 8, 1, 34, 164, 363, 489, 446, 288, 133, 43, 9, 1, 55, 290, 709, 1068, 1105, 826, 455, 184, 53, 10, 1, 89, 509, 1362, 2266, 2619, 2219, 1414, 682, 246, 64, 11, 1
Offset: 0

Views

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

This triangle is obtained by reversing the rows of the triangle A193736.

Examples

			First six rows:
  1;
  1,  1;
  1,  2,  1;
  2,  4,  3,  1;
  3,  8,  8,  4,  1;
  5, 15, 19, 13,  5,  1;
		

Crossrefs

Cf. A000007, A011782 (diagonal sums), A019590, A052542 (row sums).

Programs

  • Magma
    function T(n,k) // T = A193737
      if k lt 0 or n lt 0 then return 0;
      elif n lt 3 then return Binomial(n,k);
      else return T(n - 1, k) + T(n - 1, k - 1) + T(n - 2, k);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 24 2023
    
  • Mathematica
    (* First program *)
    z=20;
    p[0, x_]:= 1;
    p[n_, x_]:= Fibonacci[n+1, x] /; n > 0
    q[n_, x_]:= (x + 1)^n;
    t[n_, k_]:= Coefficient[p[n, x], x^(n-k)];
    t[n_, n_]:= p[n, x] /. x -> 0;
    w[n_, x_]:= Sum[t[n, k]*q[n-k+1, x], {k,0,n}]; w[-1, x_] := 1;
    g[n_]:= CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n,-1,z}]] (* A193736 *)
    TableForm[Table[g[n], {n,-1,z}]]
    Flatten[Table[g[n], {n,-1,z}]]          (* A193737 *)
    (* Additional programs *)
    (* Function RiordanSquare defined in A321620. *)
    RiordanSquare[1 + 1/(1 - x - x^2), 11]//Flatten  (* Peter Luschny, Feb 27 2021 *)
    T[n_, k_]:= T[n, k]= If[n<3, Binomial[n, k], T[n-1,k] + T[n-1,k-1] + T[n-2,k]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Oct 24 2023 *)
  • SageMath
    def T(n,k): # T = A193737
        if (n<3): return binomial(n,k)
        else: return T(n-1,k) +T(n-1,k-1) +T(n-2,k)
    flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Oct 24 2023

Formula

Write w(n,k) for the triangle at A193736. This is then given by w(n,n-k).
T(0,0) = T(1,0) = T(1,1) = T(2,0) = 1; T(n,k) = 0 if k<0 or k>n; T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k). - Philippe Deléham, Feb 13 2020
From G. C. Greubel, Oct 24 2023: (Start)
T(n, 0) = Fibonacci(n) + [n=0] = A324969(n+1).
T(n, n-1) = n, for n >= 1.
T(n, n-2) = A034856(n-1), for n >= 2.
T(2*n, n) = A330793(n).
Sum_{k=0..n} T(n,k) = A052542(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A000007(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A011782(n).
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k,k) = A019590(n). (End)

A094024 Alternating 1 with one less than the powers of 2.

Original entry on oeis.org

1, 1, 1, 3, 1, 7, 1, 15, 1, 31, 1, 63, 1, 127, 1, 255, 1, 511, 1, 1023, 1, 2047, 1, 4095, 1, 8191, 1, 16383, 1, 32767, 1, 65535, 1, 131071, 1, 262143, 1, 524287, 1, 1048575, 1, 2097151, 1, 4194303, 1, 8388607, 1, 16777215, 1, 33554431, 1, 67108863, 1
Offset: 0

Views

Author

Paul Barry, Apr 22 2004

Keywords

Comments

Inverse binomial transform of A052542. Partial sums are A075427.
Let F(x) = product {n >= 0} (1 - x^(3*n+1))/(1 - x^(3*n+2)). This sequence is the simple continued fraction expansion of the real number F(1/2) = 0.64227 25013 85234 96714 ... = 1/(1 + 1/(1 + 1/(1 + 1/(3 + 1/(1 + 1/(7 + 1/(1 + 1/(15 + ...)))))))). See A111317. - Peter Bala, Dec 26 2012

Crossrefs

Programs

  • Magma
    [Ceiling((-1)^n+((Sqrt(2))^n-(-Sqrt(2))^n)/Sqrt(2)): n in [0..50]]; // Vincenzo Librandi, Aug 17 2011
    
  • Mathematica
    LinearRecurrence[{-1, 2, 2}, {1, 1, 1}, 60] (* Jean-François Alcover, Jul 02 2018 *)
  • PARI
    a(n)=(1-(-1)^n)*2^floor(n/2)+(-1)^n

Formula

G.f.: (1+2*x) / ((1+x) * (1-2*x^2)).
E.g.f.: exp(-x) + 2*sinh(sqrt(2)*x) / sqrt(2).
a(n) = (-1)^n + ((sqrt(2))^n - (-sqrt(2))^n) / sqrt(2).
a(n) = (1-(-1)^n) * 2^floor(n/2) + (-1)^n. - Ralf Stephan, Aug 19 2013
a(n) = -a(n-1) + 2*a(n-2) + 2*a(n-3). - Andrew Howroyd, Feb 21 2018

Extensions

Better name from Ralf Stephan, Aug 19 2013
Even terms for n >= 60 corrected in b-file by Andrew Howroyd, Feb 21 2018

A082766 Series ratios converge alternately to sqrt(2) and 1+sqrt(1/2).

Original entry on oeis.org

1, 1, 2, 3, 4, 7, 10, 17, 24, 41, 58, 99, 140, 239, 338, 577, 816, 1393, 1970, 3363, 4756, 8119, 11482, 19601, 27720, 47321, 66922, 114243, 161564, 275807, 390050, 665857, 941664, 1607521, 2273378, 3880899, 5488420, 9369319, 13250218, 22619537
Offset: 1

Views

Author

Gary W. Adamson, May 24 2003

Keywords

Comments

a(2n+2)/a(2n+1) converges to sqrt(2).
a(2n+1)/a(2n) converges to 1+sqrt(1/2).
a(n+2)/a(n) converges to 1+sqrt(2).
a(2n) is A001333, a(2n+1) is A052542.

Crossrefs

Cf. A001333, A052542. See A119016 for another version.

Programs

  • Haskell
    import Data.List (transpose)
    a082766 n = a082766_list !! (n-1)
    a082766_list = concat $ transpose [a052542_list, tail a001333_list]
    -- Reinhard Zumkeller, Feb 24 2015
    
  • Mathematica
    Rest[CoefficientList[Series[x (1 - x^2 + x) (x^2 + 1)/(1 - 2 x^2 - x^4), {x, 0, 50}], x]] (* G. C. Greubel, Nov 28 2017 *)
    LinearRecurrence[{0,2,0,1},{1,1,2,3,4},50] (* Harvey P. Dale, Dec 15 2022 *)
  • PARI
    x='x+O('x^30); Vec(x*(1+x-x^2)*(x^2+1)/(1-2*x^2-x^4)) \\ G. C. Greubel, Nov 28 2017

Formula

a(2n) = a(2n-1) + a(2n-2); a(2n+1) = a(2n) + a(2n-2)
O.g.f.: x*(1+x-x^2)*(x^2+1)/(1-2*x^2-x^4). - R. J. Mathar, Aug 08 2008

Extensions

Edited by Don Reble, Nov 04 2005

A117918 Difference row triangle of the Pell sequence.

Original entry on oeis.org

1, 1, 2, 2, 3, 5, 2, 4, 7, 12, 4, 6, 10, 17, 29, 4, 8, 14, 24, 41, 70, 8, 12, 20, 34, 58, 99, 169, 8, 16, 28, 48, 82, 140, 239, 408, 16, 24, 40, 68, 116, 198, 338, 577, 985, 16, 32, 56, 96, 164, 280, 478, 816, 1393, 2378, 32, 48, 80, 136, 232, 396, 676, 1154, 1970, 3363, 5741
Offset: 1

Views

Author

Gary W. Adamson, Apr 02 2006

Keywords

Examples

			First few rows of the triangle are:
  1;
  1,  2;
  2,  3,  5;
  2,  4,  7, 12;
  4,  6, 10, 17, 29;
  4,  8, 14, 24, 41, 70;
  8, 12, 20, 34, 58, 99, 169;
  ...
		

References

  • Raymond Lebois, "Le théorème de Pythagore et ses implications", p. 123, Editions PIM, (1979).

Crossrefs

Column 1 is A016116(n-1).
Diagonals include A000129, A001333, A052542, A002203, A371596.

Programs

  • Magma
    Pell:= func< n | Round(((1+Sqrt(2))^n -(1-Sqrt(2))^n)/(2*Sqrt(2))) >;
    T:= func< n,k | (&+[ (-1)^j*Binomial(n-k,j)*Pell(n-j): j in [0..n-k]]) >;
    [T(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Oct 23 2021
    
  • Mathematica
    T[n_, k_]:= T[n, k]= If[k==1, 2^Floor[(n-1)/2], T[n, k-1] + T[n-1, k-1]];
    Table[T[n, k], {n,12}, {k,n}]//Flatten (* G. C. Greubel, Oct 22 2021 *)
  • Sage
    def A117918(n,k): return sum( (-1)^j*binomial(n-k, j)*lucas_number1(n-j, 2,-1) for j in (0..n) )
    flatten([[A117918(n,k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Oct 23 2021

Formula

Difference rows of the Pell sequence A000129 starting (1, 2, 5, 12, ...) become the diagonals of the triangle.
T(n, n) = A000129(n).
T(n, n-1) = A000129(n) - A000129(n-1).
From G. C. Greubel, Oct 23 2021: (Start)
T(n, k) = T(n, k-1) + T(n-1, k-1) with T(n, 1) = 2^floor((n-1)/2).
T(n, k) = Sum_{j=0..n-k} (-1)^j*binomial(n-k, j)*Pell(n-j), where Pell(n) = A000129(n).
Sum_{k=1..n} T(n, k) = Pell(n+1) -2^floor(n/2)*((1 + (-1)^n)/2) - 2^floor((n - 1)/2)*((1 - (-1)^n)/2). (End)

A193736 Triangular array: the fusion of polynomial sequences P and Q given by p(n,x) = (n+1)-st Fibonacci polynomial and q(n,x) = (x+1)^n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 4, 2, 1, 4, 8, 8, 3, 1, 5, 13, 19, 15, 5, 1, 6, 19, 36, 42, 28, 8, 1, 7, 26, 60, 91, 89, 51, 13, 1, 8, 34, 92, 170, 216, 182, 92, 21, 1, 9, 43, 133, 288, 446, 489, 363, 164, 34, 1, 10, 53, 184, 455, 826, 1105, 1068, 709, 290, 55, 1, 11, 64, 246, 682, 1414, 2219, 2619, 2266, 1362, 509, 89
Offset: 0

Views

Author

Clark Kimberling, Aug 04 2011

Keywords

Comments

See A193722 for the definition of fusion of two sequences of polynomials or triangular arrays.

Examples

			First six rows:
  1;
  1,  1;
  1,  2,  1;
  1,  3,  4,  2;
  1,  4,  8,  8,  3;
  1,  5, 13, 19, 15,  5;
		

Crossrefs

Cf. A000007, A005314 (diagonal sums), A052542 (row sums), A077962.

Programs

  • Magma
    function T(n,k) // T = A193736
      if k lt 0 or n lt 0 then return 0;
      elif n lt 3 then return Binomial(n,k);
      else return T(n-1, k) + T(n-1, k-1) + T(n-2, k-2);
      end if;
    end function;
    [T(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Oct 24 2023
    
  • Mathematica
    (* First program *)
    p[0, x_] := 1
    p[n_, x_] := Fibonacci[n + 1, x] /; n > 0
    q[n_, x_] := (x + 1)^n
    t[n_, k_] := Coefficient[p[n, x], x^(n - k)];
    t[n_, n_] := p[n, x] /. x -> 0;
    w[n_, x_] := Sum[t[n, k]*q[n - k + 1, x], {k, 0, n}]; w[-1, x_] := 1
    g[n_] := CoefficientList[w[n, x], {x}]
    TableForm[Table[Reverse[g[n]], {n, -1, z}]]
    Flatten[Table[Reverse[g[n]], {n, -1, z}]] (* A193736 *)
    TableForm[Table[g[n], {n, -1, z}]]
    Flatten[Table[g[n], {n, -1, z}]]          (* A193737 *)
    (* Second program *)
    T[n_, k_]:= T[n, k]= If[n<3, Binomial[n, k], T[n-1,k] +T[n-1,k-1] +T[n -2,k-2]];
    Table[T[n, k], {n,0,12}, {k,0,n}]//TableForm (* G. C. Greubel, Oct 24 2023 *)
  • SageMath
    def T(n,k): # T = A193736
        if (n<3): return binomial(n,k)
        else: return T(n-1,k) +T(n-1,k-1) +T(n-2,k-2)
    flatten([[T(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Oct 24 2023

Formula

T(0,0) = T(1,0) = T(1,1) = T(2,0) = T(2,2) = 1; T(n,k) = 0 if k<0 or k>n; T(n,k) = T(n-1,k) + T(n-1,k-1) + T(n-2,k-2). - Philippe Deléham, Feb 13 2020
From G. C. Greubel, Oct 24 2023: (Start)
T(n, k) = A193737(n, n-k).
T(n, n) = Fibonacci(n) + [n=0] = A324969(n+1).
T(n, n-1) = A029907(n).
Sum_{k=0..n} T(n, k) = A052542(n).
Sum_{k=0..n} (-1)^k * T(n, k) = A000007(n).
Sum_{k=0..floor(n/2)} T(n-k, k) = A005314(n) + [n=0].
Sum_{k=0..floor(n/2)} (-1)^k * T(n-k, k) = [n=0] + A077962(n-1). (End)

A201509 Irregular triangle read by rows: T(n,k) = 2*T(n-1,k) + T(n-2,k-1) with T(0,0) = 0, T(n,0) = T(1,1) = 1 and T(n,k) = 0 if k < 0 or if n < k.

Original entry on oeis.org

1, 1, 2, 2, 4, 5, 1, 8, 12, 4, 16, 28, 13, 1, 32, 64, 38, 6, 64, 144, 104, 25, 1, 128, 320, 272, 88, 8, 256, 704, 688, 280, 41, 1, 512, 1536, 1696, 832, 170, 10, 1024, 3328, 4096, 2352, 620, 61, 1, 2048, 7168
Offset: 0

Views

Author

Paul Curtz, Dec 02 2011

Keywords

Comments

This is the pseudo-triangle whose successive lines are of the type T(n,0), T(n,1)+T(n-1,0), T(n,2)+T(n-1,1), ... T(n,k)+T(n-1,k-1), without 0's, with T=A201701. [e-mail, Philippe Deléham, Dec 04 2011]

Examples

			Triangle starts:
    1   1
    2   2
    4   5   1
    8  12   4
   16  28  13  1
   32  64  38  6
   64 144 104 25 1
  128 320 272 88 8
  ...
Triangle begins (full version):
    0
    1,   1
    2,   2,   0
    4,   5,   1,  0
    8,  12,   4,  0, 0
   16,  28,  13,  1, 0, 0
   32,  64,  38,  6, 0, 0, 0
   64, 144, 104, 25, 1, 0, 0, 0
  128, 320, 272, 88, 8, 0, 0, 0, 0
		

Crossrefs

Cf. A052542 (row sums).

Formula

T(n,k) = 2*T(n-1,k) + T(n-2,k-1) with T(0,0) = 0, T(n,0) = T(1,1) = 1 and T(n,k) = 0 if k < 0 or if n < k. - Philippe Deléham, Dec 05 2011
The n-th row polynomial appears to equal Sum_{k = 1..floor((n+1)/2)} binomial(n,2*k-1)*(1+t)^k. Cf. A034867. - Peter Bala, Sep 10 2012
Aside from the first two rows below, the signed coefficients appear in the expansion (b*x - 1)^2 / (a*b*x^2 - 2a*x + 1) = 1 + (2 a - 2 b)x + (4 a^2 - 5 a b + b^2)x^2 + (8 a^3 - 12 a^2b + 4 ab^2)x^3 + ..., the reciprocal of the derivative of x*(1-a*x) / (1-b*x). This is related to A263633 via the expansion (a*b*x^2 - 2a*x + 1) / (b*x - 1)^2 = 1 + (b - a) (2x + 3b x^2 + 4b^2 x^3 + ...). See also A201780. - Tom Copeland, Oct 30 2023

Extensions

Edited and new name using Philippe Deléham's formula, Joerg Arndt, Dec 13 2023

A227972 Two column recursive array A(n,k), relating expressions based on half-squares (A007590) to each other and several other sequences, read by rows.

Original entry on oeis.org

1, 0, 1, 1, 1, 2, 3, 4, 5, 7, 7, 10, 17, 24, 29, 41, 41, 58, 99, 140, 169, 239, 239, 338, 577, 816, 985, 1393, 1393, 1970, 3363, 4756, 5741, 8119, 8119, 11482, 19601, 27720, 33461, 47321, 47321, 66922, 114243, 161564, 195025, 275807, 275807, 390050, 665857, 941664, 1136689, 1607521
Offset: 1

Views

Author

Richard R. Forberg, Aug 01 2013

Keywords

Comments

The first column (k=1) holds the interleaved integer square roots of these two "Half-Square" expressions in ascending order: floor(m^2/2 + 1) for m=>0 and floor(m^2/2 - 1) for m=>1. The second column (k=2) holds the value of m that yields the corresponding integer square root.
The value of m for row n (at n mod 3 = 2) is the value of the square root for the next row (at n mod 3 = 0) which uses the other expression.
There are twice as many results for the expression floor(m^2/2 + 1) as for floor(m^2/2 - 1), interleaved consistently as two of every three results (as shown in the example below).
The first column, for n mod 3 = 1, produces A001541.
The first column, for n mod 3 = 2, produces A001653.
NOTE: Interleaving of the two sequences above is A079496.
The first column, for n mod 3 = 0, produces A002315 (NSW Numbers).
NOTE: Interleaving of A001541 and A002315 is A001333.
The second column, for n mod 3 = 1, produces A005319.
The second column, for n mod 3 = 2, produces A002315 (again).
NOTE: Interleaving of the two sequences above is A143608.
The second column, for n mod 3 = 0, produces A075870.
NOTE: Interleaving of A005319 and A075870 is A052542 = 2*A000129 (Pell)
The row sums at n mod 3 = 1 and n mod 3 = 0 are used in the recursion to produce values in subsequent rows of the array for both columns.
For rows at n mod 3 = 2, the ascending interleaved combination of A(n,1) and the row sum (of the same row) produces A000129 (Pell Numbers).
Row sums also hold all the integer square roots (as given in A001542) of the Half-Squares, (A007590), at n mod 3 = 2, and the corresponding values of m in the next row at n mod 3 = 0, corresponding to A001541.
The value of the floor of half the row sum, for n mod 3 =0 and n mod 3 = 1, produces A048739, giving the partial sums of A000129 (Pell Numbers), for the Pell Numbers produced through the prior row at n mod 3 = 2.
The value of half the row sum, for n mod 3 = 2, produces A001109 (without its initial 0). This subsequence is also produced from finding the integer square roots of A083374. The value of the indices of that sequence where these roots occur is given by A002315 (NSW Numbers).
The differences of two entries in row n equals the row sum for row n-3, consistently for all rows n > 3.
The ratio of the two entries in the same row converges to sqrt(2).
The ratio of two entries in the same column (either k=1 or k=2) converge as follows:
A(k,n)/A(k,n-1)--> sqrt(2) for n mod 3 = 0,
--> sqrt(2) + 1 for n mod 3 = 1,
--> sqrt(2)/2 + 1 for n mod 3 = 2.
A(k,n)/A(k,n-3)--> sqrt(8) + 3 for n mod 3 = 0, 1, or 2,
That last line means: A001541, A001653, A002315, A005319 and A075870 all have the convergence ratio of sqrt(8) + 3 for adjacent terms. In addition alternating Pell Numbers also converge to that ratio.

Examples

			The two column array with row number n and the row sum. An extra column on the right shows which expression is applicable to get that row's values: either floor(m^2/2 + 1) indicated as "+1",  or floor(m^2/2 - 1) indicated as "-1". (NOTE: The value of n is immaterial, except as a row number).
The array begins:
Row         k=1         k=2                   Applicable "Half-Square"
n          (sqrt)       (m)         Row Sum        Expression
1            1           0               1             +1
2            1           1               2             +1
3            1           2               3             -1
4            3           4               7             +1
5            5           7              12             +1
6            7          10              17             -1
7           17          24              41             +1
8           29          41              70             +1
9           41          58              99             -1
10          99         140             239             +1
11         169         239             408             +1
12         239         338             577             -1
13         577         816            1393             +1
14         985        1393            2378             +1
15        1393        1970            3363             -1
16        3363        4756            8119             +1
17        5741        8119           13860             +1
18        8119       11482           19601             -1
19       19601       27720           47321             +1
20       33461       47321           80782             +1
		

Crossrefs

Formula

Initialize row 1 as A(1,1) = 1 and A(1,2) = 0, then:
For rows at n mod 3 = 0: A(n,1) = A(n-1, 2)
A(n,2) = A(n, 1) + A(n-2, 1)
For rows at n mod 3 = 1: A(n,1) = A(n-1, 1) + A(n-1, 2)
A(n,2) = A(n, 1) + A(n-1, 1)
For rows at n mod 3 = 2: A(n,1) = A(n-1,1) + A(n-3, 1)
A(n,2) = A(n-1,1) + A(n-1, 2)
Empirical g.f.: -x*(2*x^11-x^10-x^9+x^8-4*x^7+3*x^6-2*x^5-x^4-x^3-x^2-1) / ((x^6-2*x^3-1)*(x^6+2*x^3-1)). - Colin Barker, Aug 08 2013

Extensions

Some additional comments by Richard R. Forberg, Aug 12 2013

A287144 Number of partitions of n such that the absolute difference between any part i and the sum of all other parts not larger than i is not larger than two.

Original entry on oeis.org

1, 1, 2, 2, 4, 4, 7, 6, 10, 8, 15, 11, 17, 13, 23, 16, 24, 18, 33, 23, 34, 26, 43, 28, 41, 30, 53, 36, 52, 39, 63, 40, 58, 42, 75, 51, 74, 56, 90, 57, 83, 60, 103, 69, 97, 71, 112, 69, 99, 71, 124, 83, 119, 89, 141, 88, 127, 91, 154, 102, 142, 103, 161, 98
Offset: 0

Views

Author

Alois P. Heinz, May 20 2017

Keywords

Examples

			a(7) = 6: 31111, 3211, 322, 331, 4111, 421.
a(8) = 10: 32111, 3221, 3311, 332, 41111, 4211, 422, 431, 5111, 521.
a(9) = 8: 42111, 4221, 4311, 432, 51111, 5211, 522, 531.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, 1, `if`(i<1, 0,
          b(n, i-1)+`if`(i>n or abs(i-(n-i))>2, 0, b(n-i, i))))
        end:
    a:= n-> b(n$2):
    seq(a(n), n=0..100);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, 1, If[i < 1, 0, b[n, i - 1] + If[i > n || Abs[i - (n - i)] > 2, 0, b[n - i, i]]]];
    a[n_] := b[n, n];
    a /@ Range[0, 100] (* Jean-François Alcover, Dec 11 2020, after Alois P. Heinz *)

Formula

a(2^n-1) = A265278(n) for n>0.
a(2^n) = A052542(n).
a(2^n+1) = A182780(n-1) for n>0.
Previous Showing 11-20 of 27 results. Next