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

A022026 Define the sequence T(a(0),a(1)) by a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n) for n >= 0. This is T(2,15).

Original entry on oeis.org

2, 15, 112, 836, 6240, 46576, 347648, 2594880, 19368448, 144568064, 1079070720, 8054293504, 60118065152, 448727347200, 3349346516992, 24999862747136, 186601515909120, 1392812676284416, 10396095346638848, 77597512067973120, 579195715157229568
Offset: 0

Views

Author

Keywords

Comments

From Alois P. Heinz, Mar 18 2009: (Start)
a(n) is also the number of forests in the 2 X (n+1) grid.
a(0)=2, because there are 2 forests in the 2 X 1 grid: 1.2 and 1-2.
a(1)=15, because there are 15 forests in the 2 X 2 grid:
1.2 1-2 1.2 1.2 1.2 1-2 1-2 1-2 1.2 1.2 1.2 1.2 1-2 1-2 1-2
. . . . . | . . | . . | . . | . . | | | | . | | | . | | . |
4.3 4.3 4.3 4-3 4.3 4.3 4-3 4.3 4-3 4.3 4-3 4-3 4-3 4.3 4-3
a(n) = 8a(n-1) - 4a(n-2) for n>=2, because each of the a(n-1) forests can be extended by 8 patterns:
.o -o .o -o .o -o .o -o
.. .. .. .. .| .| .| .|
.o .o -o -o .o .o -o -o
where 4a(n-2) of these are not forests, namely the extensions of a(n-2) forests by 4 patterns:
.o-o -o-o .o-o -o-o
.| | .| | .| | .| |
.o-o .o-o -o-o -o-o (End)

Crossrefs

Equals A028859(2n+2)/4.

Programs

  • Maple
    a:= n-> (Matrix([[15,2]]). Matrix([[8, 1], [-4, 0]])^n)[1, 2]:
    seq(a(n), n=0..35);  # Alois P. Heinz, Mar 18 2009
  • Mathematica
    CoefficientList[Series[(2-x)/(1-8*x+4*x^2), {x, 0, 20}], x] (* Vaclav Kotesovec, May 03 2014 *)
  • PARI
    a(n)=([15,2]*[8,1;-4,0]^n)[2] \\ M. F. Hasler, Feb 10 2016

Formula

G.f.: (2-x)/(1-8x+4x^2). - David Boyd and Ralf Stephan, Apr 15 2004
From Peter Bala, May 03 2014: (Start)
a(n) = sum of the entries in the 2 X 2 matrix A^n where A is the 2 X 2 matrix [4, 4; 3, 4].
a(n) = (1 + 7*sqrt(3)/12)*(4 + 2*sqrt(3))^n + (1 - 7*sqrt(3)/12)*(4 - 2*sqrt(3))^n. See Desjarlais and Molina. (End)
a(n+1) = ceiling(a(n)^2/a(n-1))-1 for all n > 0. - M. F. Hasler, Feb 10 2016

A022032 Define the sequence T(a(0),a(1)) by a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n) for n >= 0. This is T(5,26).

Original entry on oeis.org

5, 26, 135, 700, 3629, 18813, 97527, 505582, 2620947, 13587040, 70435478, 365138879, 1892887004, 9812762803, 50869551972, 263708740319, 1367071205166, 7086923541985, 36738748574433, 190454382472052, 987319198674433, 5118281802804775, 26533271760636405, 137548993480193164
Offset: 0

Views

Author

Keywords

Comments

The empirical g.f. / recurrence agrees with the original definition for at least 2000 terms (and a(2000) ~ 10^1430). - M. F. Hasler, Feb 11 2016

Crossrefs

Programs

  • Mathematica
    (* This empirical recurrence should not be used to extend the data. *) LinearRecurrence[{5, 1, 0, -1, -1, -1, -1}, {5, 26, 135, 700, 3629, 18813, 97527}, 24] (* Jean-François Alcover, Dec 12 2016 *)
  • PARI
    a=[5,26];for(n=2,2000, a=concat(a, ceil(a[n]^2/a[n-1])-1));A022032(n)=a[n+1] \\ M. F. Hasler, Feb 11 2016

Formula

Empirical g.f.: -(x^6+x^5+x^4+x^3-x-5) / (x^7+x^6+x^5+x^4-x^2-5*x+1). - Colin Barker, Sep 18 2015
a(n+1) = ceiling(a(n)^2/a(n-1))-1 for all n > 0. - M. F. Hasler, Feb 11 2016

Extensions

Edited by M. F. Hasler, Feb 11 2016

A022031 Define the sequence T(a(0),a(1)) by a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n) for n >= 0. This is T(4,17).

Original entry on oeis.org

4, 17, 72, 304, 1283, 5414, 22845, 96397, 406757, 1716352, 7242319, 30559689, 128949662, 544115986, 2295951781, 9687997993, 40879475731, 172495033261, 727860031657, 3071278144467, 12959565068034, 54684179957837, 230745362360740, 973653116715681, 4108426630946045
Offset: 0

Views

Author

Keywords

Comments

The empirical g.f. / recurrence agrees with the original definition for at least 2000 terms (and a(2000) ~ 10^1250). - M. F. Hasler, Feb 11 2016

Crossrefs

Programs

  • PARI
    a=[4,17];for(n=2,2000,a=concat(a,ceil(a[n]^2/a[n-1])-1));A022031(n)=a[n+1] \\ M. F. Hasler, Feb 11 2016

Formula

Empirical g.f.: -(x^6+x^5+x^4+x^3-x-4) / ((x-1)*(x^6+2*x^5+3*x^4+4*x^3+4*x^2+3*x-1)). - Colin Barker, Sep 18 2015
a(n+1) = ceiling(a(n)^2/a(n-1))-1 for all n > 0. a(n+1)/a(n) ~ 4.219599938... as n -> oo. - M. F. Hasler, Feb 11 2016

Extensions

Edited by M. F. Hasler, Feb 11 2016

A022024 Define the sequence S(a(0),a(1)) by a(n+2) is the least integer such that a(n+2)/a(n+1) > a(n+1)/a(n) for n >= 0. This is S(6,66).

Original entry on oeis.org

6, 66, 727, 8009, 88232, 972018, 10708349, 117969769, 1299627646, 14317498734, 157730385799, 1737655093709, 19143078927992, 210891949829430, 2323315631208341, 25595076182769253, 281971126093205254, 3106367622527151978, 34221659288246953735, 377006879658404795777
Offset: 0

Views

Author

Keywords

Comments

This coincides with the linearly recurrent sequence defined by the expansion of (6 - 5*x^2)/(1 - 11*x - x^2 + 9*x^3) only up to n <= 169. - Bruno Berselli, Feb 11 2016

Crossrefs

Programs

  • Maple
    A022024 := proc(n)
        option remember;
        if n <= 1 then
            op(n+1,[6,66]) ;
        else
            a := procname(n-1)^2/procname(n-2) ;
            if type(a,'integer') then
                a+1 ;
            else
                ceil(a) ;
            fi;
        end if;
    end proc: # R. J. Mathar, Feb 10 2016
  • Mathematica
    a[n_] := a[n] = Switch[n, 0, 6, 1, 66, _, Floor[a[n-1]^2/a[n-2]]+1];
    Table[a[n], {n, 0, 30}] (* Jean-François Alcover, Feb 08 2024 *)
  • PARI
    a=[6,66];for(n=2,30,a=concat(a,a[n]^2\a[n-1]+1));a \\ M. F. Hasler, Feb 10 2016
    
  • Python
    def a(n):
        if n == 0: return 6
        prev_1, prev_2 = 66, 6
        for i in range(2, n + 1):
            prev_2, prev_1 = prev_1, (prev_1 ** 2) // prev_2 + 1
        return prev_1 # Paul Muljadi, Feb 12 2024

Formula

a(n+1) = floor(a(n)^2/a(n-1))+1 for all n > 0. - M. F. Hasler, Feb 10 2016

Extensions

Double-checked and extended to 3 lines of data by M. F. Hasler, Feb 10 2016

A022027 Define the sequence T(a(0),a(1)) by a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n) for n >= 0. This is T(2,16).

Original entry on oeis.org

2, 16, 127, 1008, 8000, 63492, 503904, 3999232, 31739888, 251903488, 1999230976, 15866888256, 125927492096, 999423012864, 7931916549888, 62951622430720, 499615287394304, 3965194632954880, 31469750573916160, 249759543441752064, 1982215569002196992, 15731845549721911296
Offset: 0

Views

Author

Keywords

Comments

Not to be confused with the Pisot T(2,16) sequence, which is A013730. - R. J. Mathar, Feb 13 2016

Crossrefs

Programs

  • Magma
    I:=[2,16]; [n le 2 select I[n] else Ceiling(Self(n-1)^2/Self(n-2))-1: n in [1..30]]; // Vincenzo Librandi, Feb 12 2016
  • Mathematica
    RecurrenceTable[{a[1] == 2, a[2] == 16, a[n] == Ceiling[a[n-1]^2 / a[n-2] - 1]}, a, {n, 30}] (* Vincenzo Librandi, Feb 12 2016 *)
  • PARI
    a=[2, 16]; for(n=2, 1000, a=concat(a, ceil(a[n]^2/a[n-1])-1)); A022027(n)=a[n+1] \\ M. F. Hasler, Feb 11 2016
    

Formula

Conjectures: a(n) = 8*a(n-1)-4*a(n-3). G.f.: -(x^2-2) / (4*x^3-8*x+1). - Colin Barker, Sep 18 2015
a(n+1) = ceiling(a(n)^2/a(n-1))-1 for n>0. - M. F. Hasler, Feb 11 2016

Extensions

Double-checked (original definition agrees with g.f. / recurrence for n=0..1000), extended and edited by M. F. Hasler, Feb 11 2016

A022021 Define the sequence S(a(0),a(1)) by a(n+2) is the least integer such that a(n+2)/a(n+1) > a(n+1)/a(n) for n >= 0. This is S(5,20).

Original entry on oeis.org

5, 20, 81, 329, 1337, 5434, 22086, 89767, 364852, 1482917, 6027219, 24497237, 99567416, 404685244, 1644816681, 6685249720, 27171759829, 110437838993, 448867366641, 1824392026070, 7415121953942, 30138277741915, 122495056843392, 497873139253657, 2023572780632275
Offset: 0

Views

Author

Keywords

Comments

This coincides with the linearly recurrent sequence defined by the expansion of (5 - 4*x^2)/(1 - 4*x - x^2 + 3*x^3) only up to n <= 39. - Bruno Berselli, Feb 11 2016

Crossrefs

Programs

  • Maple
    A022021 := proc(n)
        option remember;
        if n <= 1 then
            op(n+1,[5,20]) ;
        else
            a := procname(n-1)^2/procname(n-2) ;
            if type(a,'integer') then
                a+1 ;
            else
                ceil(a) ;
            fi;
        end if;
    end proc: # R. J. Mathar, Feb 10 2016
  • PARI
    a=[5,20];for(n=2,30,a=concat(a,a[n]^2\a[n-1]+1));a \\ M. F. Hasler, Feb 10 2016

Formula

a(n+1) = floor(a(n)^2/a(n-1))+1 for all n > 0. - M. F. Hasler, Feb 10 2016

Extensions

Double-checked and extended to 3 lines of data by M. F. Hasler, Feb 10 2016

A022022 Define the sequence S(a(0),a(1)) by a(n+2) is the least integer such that a(n+2)/a(n+1) > a(n+1)/a(n) for n >= 0. This is S(5,45).

Original entry on oeis.org

5, 45, 406, 3664, 33067, 298425, 2693244, 24306152, 219359637, 1979690177, 17866428166, 161242026212, 1455186832835, 13132858524565, 118522219370436, 1069646525028644, 9653410934956277, 87120689404042085, 786252089896134534, 7095815621924558952, 64038747861388870507
Offset: 0

Views

Author

Keywords

Comments

This coincides with the linearly recurrent sequence defined by the expansion of (5 - 4*x^2)/(1 - 9*x - x^2 + 7*x^3) only up to n <= 103. - Bruno Berselli, Feb 11 2016

Crossrefs

Programs

  • Maple
    a:= proc(n) option remember;
          `if`(n<2, [5, 45][n+1], floor(a(n-1)^2/a(n-2))+1)
        end:
    seq(a(n), n=0..30);  # Alois P. Heinz, Sep 18 2015
  • Mathematica
    nxt[{a_,b_}]:=Module[{c=Ceiling[b^2/a]},c=If[c<=b^2/a,c+1,c];{b,c}]; Transpose[NestList[nxt,{5,45},20]][[1]] (* Harvey P. Dale, Feb 11 2014 *)
  • PARI
    a=[5,45];for(n=2,30,a=concat(a,a[n]^2\a[n-1]+1));a \\ M. F. Hasler, Feb 10 2016

Formula

a(n+1) = floor(a(n)^2/a(n-1))+1 for all n > 0. - M. F. Hasler, Feb 10 2016

Extensions

Double-checked and edited by M. F. Hasler, Feb 10 2016

A022023 Define the sequence S(a(0),a(1)) by a(n+2) is the least integer such that a(n+2)/a(n+1) > a(n+1)/a(n) for n >= 0. This is S(6,30).

Original entry on oeis.org

6, 30, 151, 761, 3836, 19337, 97477, 491378, 2477019, 12486565, 62944332, 317300149, 1599498817, 8063016906, 40645382751, 204891935393, 1032852992092, 5206575364849, 26246162074765, 132305973770306, 666949729466899, 3362069972805741, 16948075698414380
Offset: 0

Views

Author

Keywords

Comments

This coincides with the linearly recurrent sequence defined by the expansion of (6 - 5*x^2)/(1 - 5*x - x^2 + 4*x^3) only up to n <= 69. - Bruno Berselli, Feb 11 2016

Crossrefs

Programs

  • Maple
    A022023 := proc(n)
        option remember;
        if n <= 1 then
            op(n+1,[6,30]) ;
        else
            a := procname(n-1)^2/procname(n-2) ;
            if type(a,'integer') then
                a+1 ;
            else
                ceil(a) ;
            fi;
        end if;
    end proc: # R. J. Mathar, Feb 10 2016
  • PARI
    a=[6,30];for(n=2,30,a=concat(a,a[n]^2\a[n-1]+1));a \\ M. F. Hasler, Feb 10 2016

Formula

a(n+1) = floor(a(n)^2/a(n-1))+1 for all n > 0. - M. F. Hasler, Feb 10 2016

Extensions

Double-checked and extended to 3 lines of data by M. F. Hasler, Feb 10 2016

A022028 Define the sequence T(a(0),a(1)) by a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n) for n >= 0. This is T(2,32).

Original entry on oeis.org

2, 32, 511, 8160, 130304, 2080776, 33227136, 530591744, 8472821696, 135299330048, 2160544546816, 34500930175488, 550932488167424, 8797635454304256, 140486159827464192, 2243371097334087680, 35823556473710968832, 572053014300755787776, 9134901260033419902976
Offset: 0

Views

Author

Keywords

Comments

Not to be confused with the Pisot T(2,32) sequence as defined in A008776, which is A013776. - R. J. Mathar, Feb 13 2016

Crossrefs

Programs

  • PARI
    a=[2,32];for(n=2,2000,a=concat(a,ceil(a[n]^2/a[n-1])-1));A022028(n)=a[n+1] \\ M. F. Hasler, Feb 11 2016

Formula

Conjecture: a(n) = 16*a(n-1)-8*a(n-3). G.f.: -(x^2-2) / (8*x^3-16*x+1). - Colin Barker, Sep 18 2015
a(n+1) = ceiling(a(n)^2/a(n-1))-1 for all n > 0. a(n+1)/a(n) ~ 15.968627... as n -> oo. - M. F. Hasler, Feb 11 2016

A022030 For even n, a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n); for odd n, the least integer such that a(n+2)/a(n+1) > a(n+1)/a(n); a(0) = 4, a(1) = 16.

Original entry on oeis.org

4, 16, 63, 249, 984, 3889, 15370, 60745, 240075, 948819, 3749901, 14820274, 58572352, 231488326, 914882931, 3615779646, 14290202610, 56477415835, 223208766625, 882160643536, 3486455360919, 13779090092886, 54457408494633, 215225339261149, 850608722312629, 3361756570848769
Offset: 0

Views

Author

Keywords

Comments

Original definition: a(n+2) is the greatest integer such that a(n+2)/a(n+1) < a(n+1)/a(n).
This original definition would lead to sequence 4, 16, 63, 248, 976, 3841, ... which agrees to over 2000 terms with the conjectured g.f. = (4 - x^2)/(1 - 4*x + x^3). - M. F. Hasler, Feb 11 2016

Crossrefs

Programs

  • PARI
    a=[4,16];for(n=2,2000,a=concat(a,if(bittest(n,0),a[n]^2\a[n-1]+1,ceil(a[n]^2/a[n-1])-1)));A022030(n)=a[n+1] \\ M. F. Hasler, Feb 11 2016

Formula

Conjecture: a(n) = 4*a(n-1)-a(n-3)+a(n-4). G.f. = (4-x^2+x^3)/(1-4*x+x^3-x^4). - Colin Barker, Feb 16 2012
a(n) = ceiling(a(n-1)^2/a(n-2))-1 for even n > 0, a(n) = floor(a(n-1)^2/a(n-2))+1 for even n > 0. - M. F. Hasler, Feb 11 2016

Extensions

Edited (definition changed to fit data, extended to 3 lines) by M. F. Hasler, Feb 11 2016
Showing 1-10 of 10 results.