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

A002951 Continued fraction for fifth root of 5.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 1, 2, 8, 1, 25, 1, 5, 1, 22, 1, 8, 1, 1, 9, 1, 1, 4, 1, 2, 1, 2, 1, 2, 2, 1, 1, 1, 1, 2, 1, 6, 2, 46, 1, 12, 1, 32, 1, 2, 3, 2, 3, 55, 1, 12, 3, 8, 1, 1, 11, 1, 4, 1, 1, 1, 2, 1, 1, 7, 1, 1, 4, 3, 3, 3218, 1, 3, 1, 2, 2, 3, 1, 1, 2, 11, 1, 7, 57, 2, 2, 2, 2, 1, 1, 67, 1, 2, 3, 1, 1, 13, 3
Offset: 0

Views

Author

Keywords

Comments

Fifth root of 5 = 5^(1/5). - Harry J. Smith, May 10 2009

Examples

			1.379729661461214832390063464... = 1 + 1/(2 + 1/(1 + 1/(1 + 1/(1 + ...)))). - _Harry J. Smith_, May 10 2009
		

References

  • H. P. Robinson, Letter to N. J. A. Sloane, Nov 13 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005534 (decimal expansion).
Cf. A002363, A002364 (convergents).

Programs

  • Magma
    SetDefaultRealField(RealField(100)); ContinuedFraction(5^(1/5)); // G. C. Greubel, Nov 02 2018
  • Maple
    with(numtheory): cfrac(5^(1/5),100,'quotients'); # Muniru A Asiru, Nov 02 2018
  • Mathematica
    ContinuedFraction[5^(1/5), 100] (* G. C. Greubel, Nov 02 2018 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 21000); x=contfrac(5^(1/5)); for (n=1, 20000, write("b002951.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 10 2009
    

Extensions

More terms copied from Smith's b-file by Hagen von Eitzen, Jul 20 2009
Offset changed by Andrew Howroyd, Jul 05 2024

A128742 Number of compositions of n which avoid the pattern 112.

Original entry on oeis.org

1, 1, 2, 4, 7, 13, 24, 43, 78, 142, 256, 463, 838, 1513, 2735, 4944, 8931, 16139, 29164, 52693, 95213, 172042, 310855, 561682, 1014898, 1833794, 3313454, 5987026, 10817836, 19546558, 35318325, 63816013, 115307993, 208347899, 376459955, 680218580, 1229074432
Offset: 0

Views

Author

Ralf Stephan, May 08 2007

Keywords

Crossrefs

Programs

  • Maple
    b:= proc(n, t, l) option remember; `if`(n=0, 1, add(
          b(n-j, is(j=l), j), j=1..min(n, `if`(t, l, n))))
        end:
    a:= n-> b(n, false, 0):
    seq(a(n), n=0..40);  # Alois P. Heinz, Oct 24 2017
  • Mathematica
    b[n_, t_, l_] := b[n, t, l] = If[n == 0, 1, Sum[b[n - j, j == l, j], {j, 1, Min[n, If[t, l, n]]}]];
    a[n_] := b[n, False, 0];
    Table[a[n], {n, 0, 40}] (* Jean-François Alcover, Nov 06 2017, after Alois P. Heinz *)
  • PARI
    my(N=40, x='x+O('x^N)); Vec(1/(1-sum(k=1, N, x^k*prod(j=1, k-1, 1-x^(2*j))))) \\ Seiichi Manyama, Jan 13 2022
    
  • PARI
    my(N=40, x='x+O('x^N)); Vec(1/sum(k=0, N, (-1)^k*x^k^2/prod(j=1, k, 1-x^(2*j-1)))) \\ Seiichi Manyama, Jan 13 2022

Formula

G.f.: 1/( 1 - Sum_{j>=1} x^j*Product_{i=1..j-1} (1-x^(2*i)) ).
G.f.: 1/( Sum_{k>=0} (-1)^k * x^(k^2) / Product_{j=1..k} (1-x^(2*j-1)) ). - Seiichi Manyama, Jan 13 2022

A168396 Triangle, T(n,k) = number of compositions a(1),...,a(j) of n with a(1) = k, such that a(i+1) <= a(i) + 1 for 1 <= i < j.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 5, 4, 2, 1, 1, 9, 6, 4, 2, 1, 1, 15, 11, 7, 4, 2, 1, 1, 26, 19, 12, 7, 4, 2, 1, 1, 45, 33, 21, 13, 7, 4, 2, 1, 1, 78, 57, 37, 22, 13, 7, 4, 2, 1, 1, 135, 99, 64, 39, 23, 13, 7, 4, 2, 1, 1, 234, 172, 112, 68, 40, 23, 13, 7, 4, 2, 1, 1, 406, 298, 194, 119, 70, 41, 23, 13, 7, 4, 2, 1, 1
Offset: 1

Views

Author

Keywords

Comments

The definition is a replica of the recursion formula in A005169: T(n,1) = A005169(n). Row sums, central terms and A003116 coincide: sum(T(n,k): k=1..n) = A003116(n); T(2*n-1,n) = A003116(n-1). - Reinhard Zumkeller, Sep 13 2013

Examples

			First 16 rows of triangle:
.   1:     1
.   2:     1    1
.   3:     2    1    1
.   4:     3    2    1   1
.   5:     5    4    2   1   1
.   6:     9    6    4   2   1   1
.   7:    15   11    7   4   2   1   1
.   8:    26   19   12   7   4   2   1  1
.   9:    45   33   21  13   7   4   2  1  1
.  10:    78   57   37  22  13   7   4  2  1  1
.  11:   135   99   64  39  23  13   7  4  2  1  1
.  12:   234  172  112  68  40  23  13  7  4  2  1 1
.  13:   406  298  194 119  70  41  23 13  7  4  2 1 1
.  14:   704  518  337 207 123  71  41 23 13  7  4 2 1 1
.  15:  1222  898  586 360 214 125  72 41 23 13  7 4 2 1 1
.  16:  2120 1559 1017 626 373 218 126 72 41 23 13 7 4 2 1 1
		

Crossrefs

Cf. A005169 (first column), A003116 (apparently row sums).

Programs

  • Haskell
    a168396 n k = a168396_tabl !! (n-1) !! (k-1)
    a168396_row n = a168396_tabl !! (n-1)
    a168396_tabl = [1] : f [[1]] where
       f xss = ys : f (ys : xss) where
         ys = (map sum $ zipWith take [2..] xss) ++ [1] -- Reinhard Zumkeller, Sep 13 2013
  • Maple
    b:= proc(n, k) option remember; `if`(n=0, 1,
          add(b(n-j, j+1), j=1..min(n, k)))
        end:
    T:= (n, k)-> b(n-k, k+1):
    seq(seq(T(n, k), k=1..n), n=1..14); # Alois P. Heinz, Sep 19 2013
  • Mathematica
    t[n_, k_] /; k > n = 0; t[n_, n_] = 1; t[n_, k_] := t[n, k] = Sum[ t[n-k, j], {j, 1, k+1}]; Flatten[ Table[ t[n, k], {n, 1, 13}, {k, 1, n}] ](* Jean-François Alcover, Feb 17 2012, after Pari *)
  • PARI
    T(n,k)=if(k>=n,k==n,sum(j=1,k+1,T(n-k,j)))
    
  • PARI
    Tm(n)=local(m);m=matrix(n,n);for(i=1,n,for(j=1,i,m[i,j]=if(i==j,1,sum(k=1,j+1,m[i-j,k]))));m
    

A224959 Number of compositions [p(1), p(2), ..., p(k)] of n such that p(j) - p(j-1) <= 2.

Original entry on oeis.org

1, 1, 2, 4, 8, 15, 29, 55, 105, 199, 378, 716, 1358, 2572, 4873, 9229, 17480, 33102, 62688, 118709, 224795, 425676, 806068, 1526371, 2890338, 5473125, 10363871, 19624925, 37161558, 70368705, 133249369, 252319408, 477788980, 904735349, 1713195705, 3244086145
Offset: 0

Views

Author

Joerg Arndt, Apr 21 2013

Keywords

Examples

			There are a(5) = 15 such compositions of 5:
01:  [ 1 1 1 1 1 ]
02:  [ 1 1 1 2 ]
03:  [ 1 1 2 1 ]
04:  [ 1 1 3 ]
05:  [ 1 2 1 1 ]
06:  [ 1 2 2 ]
07:  [ 1 3 1 ]
08:  [ 2 1 1 1 ]
09:  [ 2 1 2 ]
10:  [ 2 2 1 ]
11:  [ 2 3 ]
12:  [ 3 1 1 ]
13:  [ 3 2 ]
14:  [ 4 1 ]
15:  [ 5 ]
(the single forbidden composition is [ 1 4 ]).
		

Crossrefs

Cf. A003116 (compositions such that p(j) - p(j-1) <= 1).
Cf. A225084 (triangle: compositions of n such that max(p(j) - p(j-1)) = k).
Cf. A225085 (triangle: compositions of n such that max(p(j) - p(j-1)) <= k).

Programs

  • Maple
    b:= proc(n, i) option remember;
          `if`(n=0, 1, add(b(n-j, max(1, j-2)), j=i..n))
        end:
    a:= n-> b(n, 1):
    seq(a(n), n=0..40);  # Alois P. Heinz, May 02 2013
  • Mathematica
    b[n_, i_] := b[n, i] = If[n==0, 1, Sum[b[n-j, Max[1, j-2]], {j, i, n}]];
    a[n_] := b[n, 1];
    a /@ Range[0, 40] (* Jean-François Alcover, Dec 19 2020, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n, where d=1.893587506319686491635881459546948770530553555112342985931092896452453511... and c=0.6398882559654423774981963082429746674258714212085034829366885993226... - Vaclav Kotesovec, May 01 2014

A002946 Continued fraction for cube root of 3.

Original entry on oeis.org

1, 2, 3, 1, 4, 1, 5, 1, 1, 6, 2, 5, 8, 3, 3, 4, 2, 6, 4, 4, 1, 3, 2, 3, 4, 1, 4, 9, 1, 8, 4, 3, 1, 3, 2, 6, 1, 6, 1, 3, 1, 1, 1, 1, 12, 3, 1, 3, 1, 1, 4, 1, 6, 1, 5, 1, 2, 1, 3, 3, 11, 8, 1, 139, 8, 2, 8, 5, 1, 2, 2, 2, 2, 3, 1, 1, 2, 1, 1, 1, 52, 2, 46, 2, 2, 3
Offset: 0

Views

Author

Keywords

Examples

			3^(1/3) = 1.44224957030740838... = 1 + 1/(2 + 1/(3 + 1/(1 + 1/(4 + ...)))). - _Harry J. Smith_, May 08 2009
		

References

  • H. P. Robinson, Letter to N. J. A. Sloane, Nov 13 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A002581 (decimal expansion).
Cf. A002353, A002354 (convergents).

Programs

  • Magma
    SetDefaultRealField(RealField(100)); ContinuedFraction(3^(1/3)); // G. C. Greubel, Nov 02 2018
  • Maple
    with(numtheory): cfrac(3^(1/3),80,'quotients'); # Muniru A Asiru, Nov 02 2018
  • Mathematica
    ContinuedFraction[Power[3, (3)^-1],120] (* Harvey P. Dale, May 11 2011 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 21000); x=contfrac(3^(1/3)); for (n=1, 20000, write("b002946.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 08 2009
    

Extensions

Offset changed by Andrew Howroyd, Jul 04 2024

A002947 Continued fraction for cube root of 4.

Original entry on oeis.org

1, 1, 1, 2, 2, 1, 3, 2, 3, 1, 3, 1, 30, 1, 4, 1, 2, 9, 6, 4, 1, 1, 2, 7, 2, 3, 2, 1, 6, 1, 1, 1, 25, 1, 7, 7, 1, 1, 1, 1, 266, 1, 3, 2, 1, 3, 60, 1, 5, 1, 8, 5, 6, 1, 4, 20, 1, 4, 1, 1, 14, 1, 4, 4, 1, 1, 1, 1, 7, 3, 1, 1, 2, 1, 3, 1, 4, 4, 1, 1, 1, 3, 1, 34, 8, 2, 10, 6, 3, 1, 2, 31, 1, 1, 1, 4, 3, 44, 1, 45
Offset: 0

Views

Author

Keywords

Examples

			4^(1/3) = 1.58740105196819947... = 1 + 1/(1 + 1/(1 + 1/(2 + 1/(2 + ...)))). - _Harry J. Smith_, May 08 2009
		

References

  • H. P. Robinson, Letter to N. J. A. Sloane, Nov 13 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005480 (decimal expansion). - Harry J. Smith, May 08 2009
Cf. A002355, A002356 (convergents).

Programs

  • Magma
    [ContinuedFraction(4^(1/3))]; // Vincenzo Librandi, Aug 02 2015
  • Mathematica
    ContinuedFraction[4^(1/3), 80] (* Alonso del Arte, Jul 24 2015 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 21000); x=contfrac(4^(1/3)); for (n=1, 20000, write("b002947.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 08 2009
    

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Mar 29 2003
Offset changed by Andrew Howroyd, Jul 04 2024

A002948 Continued fraction for cube root of 5.

Original entry on oeis.org

1, 1, 2, 2, 4, 3, 3, 1, 5, 1, 1, 4, 10, 17, 1, 14, 1, 1, 3052, 1, 1, 1, 1, 1, 1, 2, 2, 1, 3, 2, 1, 13, 5, 1, 1, 1, 13, 2, 41, 1, 4, 12, 1, 5, 2, 7, 1, 1, 3, 33, 2, 1, 1, 1, 1, 1, 1, 3, 2, 2, 1, 15, 12, 8, 10, 48, 1, 2, 1, 1, 3, 4, 1, 474, 1, 13, 2, 4, 1, 1, 49
Offset: 0

Views

Author

Keywords

Examples

			5^(1/3) = 1.70997594667669698... = 1 + 1/(1 + 1/(2 + 1/(2 + 1/(4 + ...)))). - _Harry J. Smith_, May 08 2009
		

References

  • H. P. Robinson, Letter to N. J. A. Sloane, Nov 13 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005481 (decimal expansion).
Cf. A002357, A002358 (convergents).

Programs

  • Magma
    SetDefaultRealField(RealField(100)); ContinuedFraction(5^(1/3)); // G. C. Greubel, Nov 02 2018
  • Maple
    with(numtheory): cfrac(5^(1/3),80,'quotients'); # Muniru A Asiru, Nov 02 2018
  • Mathematica
    ContinuedFraction[5^(1/3), 100] (* G. C. Greubel, Nov 02 2018 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 21000); x=contfrac(5^(1/3)); for (n=1, 20000, write("b002948.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 08 2009
    

Extensions

Offset changed by Andrew Howroyd, Jul 04 2024

A225085 Triangle read by rows: T(n,k) is the number of compositions of n with maximal up-step <= k; n>=1, 0<=k

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 5, 7, 8, 8, 7, 13, 15, 16, 16, 11, 23, 29, 31, 32, 32, 15, 41, 55, 61, 63, 64, 64, 22, 72, 105, 119, 125, 127, 128, 128, 30, 127, 199, 233, 247, 253, 255, 256, 256, 42, 222, 378, 455, 489, 503, 509, 511, 512, 512, 56, 388, 716, 889, 967, 1001, 1015, 1021, 1023, 1024, 1024
Offset: 1

Views

Author

Joerg Arndt, Apr 27 2013

Keywords

Comments

T(n,k) is the number of compositions [p(1), p(2), ..., p(k)] of n such that max(p(j) - p(j-1)) <= k.
Rows are partial sums of rows of A225084.
The first column is A000041 (partition numbers), the second column is A003116, and the third column is A224959.
The diagonal is A011782.

Examples

			Triangle begins
01: 1,
02: 2, 2,
03: 3, 4, 4,
04: 5, 7, 8, 8,
05: 7, 13, 15, 16, 16,
06: 11, 23, 29, 31, 32, 32,
07: 15, 41, 55, 61, 63, 64, 64,
08: 22, 72, 105, 119, 125, 127, 128, 128,
09: 30, 127, 199, 233, 247, 253, 255, 256, 256,
10: 42, 222, 378, 455, 489, 503, 509, 511, 512, 512,
...
The fifth row corresponds to the following statistics:
#:  M   composition
01:  0  [ 1 1 1 1 1 ]
02:  1  [ 1 1 1 2 ]
03:  1  [ 1 1 2 1 ]
04:  2  [ 1 1 3 ]
05:  1  [ 1 2 1 1 ]
06:  1  [ 1 2 2 ]
07:  2  [ 1 3 1 ]
08:  3  [ 1 4 ]
09:  0  [ 2 1 1 1 ]
10:  1  [ 2 1 2 ]
11:  0  [ 2 2 1 ]
12:  1  [ 2 3 ]
13:  0  [ 3 1 1 ]
14:  0  [ 3 2 ]
15:  0  [ 4 1 ]
16:  0  [ 5 ]
There are 7 compositions with no up-step (M<=0), 13 with M<=1, 15 with M<=2, 16 with M<=3, and 16 with M<=4.
		

A003117 Continued fraction for fifth root of 3.

Original entry on oeis.org

1, 4, 14, 2, 1, 1, 3, 2, 29, 2, 1, 7, 1, 5, 2, 1, 1, 19, 12, 77, 2, 16, 2, 1, 1, 15, 1, 1, 3, 14, 5, 1, 3, 2, 1, 1, 1, 1, 1, 1, 5, 1, 463, 1, 379, 3, 5, 3, 11, 1, 7, 7, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 46, 17, 44, 1, 1, 1, 2, 24, 9, 1, 7, 4, 1, 2, 2, 1, 3, 2, 7, 1, 7, 1, 1, 2, 1, 1, 4, 1, 46, 8, 2
Offset: 0

Views

Author

Keywords

Examples

			1.24573093961551732596668033... = 1 + 1/(4 + 1/(14 + 1/(2 + 1/(1 + ...)))). - _Harry J. Smith_, May 12 2009
		

References

  • H. P. Robinson, Letter to N. J. A. Sloane, Nov 13 1973.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005532 (decimal expansion).

Programs

  • Mathematica
    ContinuedFraction[Surd[3,5],120] (* Harvey P. Dale, Dec 15 2018 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 21000); x=contfrac(3^(1/5)); for (n=1, 20000, write("b003117.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 12 2009

Extensions

More terms from James Sellers, Sep 08 2000
Offset changed by Andrew Howroyd, Jul 05 2024

A003118 Continued fraction for fifth root of 4.

Original entry on oeis.org

1, 3, 7, 1, 2, 2, 1, 2, 4, 56, 1, 14, 2, 1, 1, 3, 5, 6, 2, 1, 1, 2, 1, 1, 8, 1, 2, 2, 1, 5, 1, 4, 1, 1, 3, 3, 1, 1, 3, 7, 4, 1, 10, 1, 2, 1, 8, 2, 4, 1, 1, 9, 2, 2, 2, 1, 2, 1, 1, 1, 92, 1, 26, 4, 31, 1, 2, 4, 1, 62, 8, 5, 1, 1, 1, 2, 1, 1, 63, 1, 2, 5, 4, 2, 1
Offset: 0

Views

Author

Keywords

Examples

			1.319507910772894259374001971... = 1 + 1/(3 + 1/(7 + 1/(1 + 1/(2 + ...)))). - _Harry J. Smith_, May 11 2009
		

References

  • H. P. Robinson, Letter to N. J. A. Sloane, Nov 13 1973.N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A005533 (decimal expansion).

Programs

  • Mathematica
    ContinuedFraction[Surd[4,5],100] (* Harvey P. Dale, Sep 05 2025 *)
  • PARI
    { allocatemem(932245000); default(realprecision, 21000); x=contfrac(4^(1/5)); for (n=1, 20000, write("b003118.txt", n-1, " ", x[n])); } \\ Harry J. Smith, May 11 2009

Extensions

Offset changed by Andrew Howroyd, Jul 05 2024
Previous Showing 11-20 of 23 results. Next