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

A100441 a(n) is the denominator of f(n) where f(1) = 2 and f(n+1) is the solution of x + Sum_{i=1..n} f(i) = x * Product_{i=1..n} f(i).

Original entry on oeis.org

1, 1, 3, 13, 217, 57073, 3811958497, 16605534578235736513, 309708098978072051970763989442580255617, 106322990835084829467725909226560893968664147958670035553130958199430801942273
Offset: 1

Views

Author

Gilbert Boily (sgbl(AT)escape.ca), Nov 21 2004, Sep 03 2007

Keywords

Comments

Let E(0) = x + 1, let E(n+1) = 1 - E(n) + E(n)^2. Let e(n) = discrim(E(n),x) and let f(n) = e(n+1)/e(n)^2. Then f(1,2,3,...) = -3,13,217,57073,381195849,... which looks like this sequence (I do not have a proof yet). - Daniel R. L. Brown (dbrown(AT)certicom.com), Nov 18 2005
This sequence gives the next number in a sequence where the sum and the product of the terms of the sequence are equal.
It happens that the sum or product of the terms of this sequence match A001146 for the numerator of the sum or product and A076628 for the denominator of the sum or product of the sequence.
Let g(x) = x^2 - x + 1 be the map producing Sylvester's sequence A000058. Then for n >= 0, g^n(1/2) = 1/f(n+2), where g^n is the n-th iterate of g, so a(n+2) is the numerator of g^n(1/2). - Curtis Bechtel, Apr 05 2024

Examples

			2, 2, 4/3, 16/13, 256/217, 65536/57073, 4294967296/3811958497, 18446744073709551616/16605534578235736513, ... = A001146/A100441 (essentially).
		

Crossrefs

Programs

  • Magma
    I:=[1,3]; [1] cat  [n le 2 select I[n] else 2^(2^(n-1))-2^(2^(n-2))*Self(n-1)+Self(n-1)^2: n in [1..10]]; // Vincenzo Librandi, Jun 13 2015
    
  • Maple
    f:=proc(n) option remember; local i,k,k1,k2; if n = 1 then return(2); fi; k:=mul(f(i),i=1..n-1); k1:=numer(k); k2:=denom(k); k1/(k1-k2); end;
    f:=n-> if n=1 or n=2 then 2 else f(n-1)^2/(f(n-1)^2-f(n-1)+1) fi; # Robert FERREOL, Jun 12 2015
  • Mathematica
    f[n_] := f[n] = (frac = Product[f[i], {i, 1, n-1}]; p = Numerator[frac]; q = Denominator[frac]; p/(p-q)); f[1] = 2; (* or, after Robert FERREOL *) f[n_] := f[n] = If[n == 1 || n == 2, 2, f[n-1]^2/(f[n-1]^2-f[n-1]+1)]; Table[f[n], {n, 1, 10}] // Denominator (* Jean-François Alcover, Sep 19 2012, updated Jun 15 2015 *)
  • PARI
    {a(n) = my(s, t); if( n<3, n>0, t = a(n-1); s = 2^(2^(n-3)); s*s -s*t +t*t)}; /* Michael Somos, Aug 05 2017 */
    
  • SageMath
    @CachedFunction
    def a(n): # a = A100441
        if (n<3): return 2*n-1
        else: return 2^(2^(n-1)) - 2^(2^(n-2))*a(n-1) + a(n-1)^2
    [1]+[a(n) for n in range(1,12)] # G. C. Greubel, Apr 08 2023

Formula

Let F(n) = Product_{i=1..n} f(i) = p/q (say). Then f(n+1) = p/(p-q).
From Robert FERREOL, Jun 12 2015: (Start)
Recurrence: f(1) = f(2) = 2; f(n+1) = f(n)^2/(f(n)^2 - f(n) + 1).
Since f(n) = 2^(2^(n-2))/a(n) for n >= 2, the recurrence for a(n) is:
a(1) = a(2) = 1; a(n+1) = 2^(2^(n-1)) - 2^(2^(n-2))*a(n) + a(n)^2.
(End)

Extensions

Name edited by Michael Somos, Aug 05 2017

A225163 Denominators of the sequence s(n) of the sum resp. product of fractions f(n) defined recursively by f(1) = 3/1; f(n+1) is chosen so that the sum and the product of the first n terms of the sequence are equal.

Original entry on oeis.org

1, 2, 14, 938, 5274374, 199225484935778, 329478051871899046990657602014, 1022767669188735114815831063606918316150663428260080434555738
Offset: 1

Views

Author

Martin Renner, Apr 30 2013

Keywords

Comments

Numerators of the sequence s(n) of the sum resp. product of fractions f(n) is A165421(n+2), hence s(n) = sum(A165421(i+1)/A225156(i),i=1..n) = product(A165421(i+1)/A225156(i),i=1..n) = A165421(n+2)/a(n) = A011764(n-1)/a(n).

Examples

			f(n) = 3, 3/2, 9/7, 81/67, ...
3 + 3/2 = 3 * 3/2 = 9/2; 3 + 3/2 + 9/7 = 3 * 3/2 * 9/7 = 81/14; ...
s(n) = 1/b(n) = 3, 9/2, 81/14, ...
		

Crossrefs

Programs

  • Maple
    b:=proc(n) option remember; b(n-1)-b(n-1)^2; end:
    b(1):=1/3;
    a:=n->3^(2^(n-1))*b(n);
    seq(a(i),i=1..9);

Formula

a(n) = 3^(2^(n-1))*b(n) where b(n)=b(n-1)-b(n-1)^2 with b(1)=1/3.

A225169 Denominators of the sequence s(n) of the sum resp. product of fractions f(n) defined recursively by f(1) = 10/1; f(n+1) is chosen so that the sum and the product of the first n terms of the sequence are equal.

Original entry on oeis.org

1, 9, 819, 7519239, 695384944860879, 6470289227069622272847335347359, 605164280025029017271801950447677089988237937249820002811725119
Offset: 1

Views

Author

Martin Renner, Apr 30 2013

Keywords

Comments

Numerators of the sequence s(n) of the sum resp. product of fractions f(n) is A165428(n+2), hence sum(A165428(i+1)/A225162(i),i=1..n) = product(A165428(i+1)/A225162(i),i=1..n) = A165428(n+2)/a(n) = A220812(n-1)/a(n).

Examples

			f(n) = 10, 10/9, 100/91, 10000/9181, ...
10 + 10/9 = 10 * 10/9 = 100/9; 10 + 10/9 + 100/91 = 10 * 10/9 * 100/91 = 10000/819; ...
s(n) = 1/b(n) = 10, 100/9, 10000/819, ...
		

Crossrefs

Programs

  • Maple
    b:=proc(n) option remember; b(n-1)-b(n-1)^2; end:
    b(1):=1/10;
    a:=n->10^(2^(n-1))*b(n);
    seq(a(i),i=1..7);

Formula

a(n) = 10^(2^(n-1))*b(n) where b(n)=b(n-1)-b(n-1)^2 with b(1)=1/10.

A167424 Define a sequence of fractions by f(1) = 1/2, f(n+1) = (f(n)^2 + 1)/2; sequence gives numerators.

Original entry on oeis.org

0, 1, 5, 89, 24305, 1664474849, 7382162541380960705, 139566915517602820239076685726696149889, 48426946216426731755940416722216940042029155625849753533402166195474237122305
Offset: 0

Views

Author

N. J. A. Sloane, Dec 15 2009, following an email suggestion from Ji Chen

Keywords

Comments

Suppose that U_1,U_2,... is a sequence of independent uniform(0,1) random variables, and define random variables X_1,X_2,... as follows: X_1 = U_1, and, for n>=1, X_{n+1} = X_n or U_{n+1} according as U_{n+1} < E(X_n) or U_{n+1} > E(X_n), respectively, where E() denotes expectation. Then, the sequence E(X_n) is identical to the sequence f(n). Sketch of proof. E(X_1)=1/2; for n>=1, by the law of total expectation, we have E(X_{n+1}) = E(X_n)*E(X_n) + (1-E(X_n))*(1+E(X_n))/2. Hence E(X_{n+1}) = (E(X_n)^2 + 1)/2. - Shai Covo (green355(AT)netvision.net.il), Mar 08 2010
a(n) is the numerator of x_n where x_0 = 0 and x_{m+1} = (x_m)^2 + 1/4. - Michael Somos, May 12 2019

Examples

			0/1, 1/2, 5/8, 89/128, 24305/32768, 1664474849/2147483648, 7382162541380960705/9223372036854775808, ...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 5.15 Optimal Stopping Constants, p. 362.

Crossrefs

Denominators are (essentially) A058891.

Programs

  • Maple
    f:=proc(n) option remember; if n = 1 then 1/2; else (f(n-1)^2+1)/2; fi; end;
  • Mathematica
    a[1]=0; a[n_] := a[n]=(a[n - 1]^2 + 1)/2; Numerator[Table[a[n], {n, 10}]] (* José María Grau Ribas, May 19 2013 *)
  • PARI
    {a(n) = if( n<2, n>0, a(n-1)^2 + 4*(a(n-1) - a(n-2)^2)^2)}; /* Michael Somos, Aug 16 2011 */
    
  • PARI
    {a(n) = my(x=0); if( n<1, 0, for(k=1, n, x = x^2 + 1/4); numerator(x))}; /* Michael Somos, May 12 2019 */

Formula

a(n) + A076628(n+1) = 2^(2^n-1). - Shai Covo (green355(AT)netvision.net.il), Mar 17 2010
a(n+1) = a(n)^2 + 4^(2^n-1), a(0) = 0. - Henry Bottomley, Aug 21 2018

A187131 Numerator of probability that the height of a rooted random binary tree is n.

Original entry on oeis.org

1, 1, 9, 1521, 71622369, 233297499911422401, 3390052406222940758260506721830900609, 934785860242188709610961043825803400592180434378516146129897302939414193921
Offset: 0

Views

Author

Henry Bottomley, Mar 05 2011

Keywords

Comments

If each node of a rooted random binary tree has probability 1/2 of producing two branches, and p(n) is the probability that the height of the tree is n, then p(n) has the following properties:
* p(n) = 2*b(n+1)^2 with b(n) defined as in A076628;
* p(n+1) = p(n)*(1 - sqrt(p(n)/2))^2 starting from p(0)=1/2;
* Sum_n p(n) = 1;
* Sum_n n*p(n) is infinite;
* p(n) = a(n) / 2^(2^(n+1)-1).

Examples

			For n=0 the root node may have no branches giving the tree height 0, so p(0)=1/2 and a(0)=1; p(1) = 1/2*1/4 = 1/8 so a(1)=1; p(2) = 1/4*1/4 + 1/8*1/16 = 9/128 so a(2)=9; p(3) = 5/32*1/4 + 7/64*1/16 + 1/32*1/64 + 1/128*1/256 = 1521/32768 so a(3)=1521.
		

Crossrefs

Denominator is A058891 offset

Formula

a(n) = A076628(n)^2.

A225164 Denominators of the sequence s(n) of the sum resp. product of fractions f(n) defined recursively by f(1) = 5/1; f(n+1) is chosen so that the sum and the product of the first n terms of the sequence are equal.

Original entry on oeis.org

1, 4, 84, 45444, 15686405364, 2147492192737717340004, 45388476229808808857318702720533556450342484
Offset: 1

Views

Author

Martin Renner, Apr 30 2013

Keywords

Comments

Numerators of the sequence s(n) of the sum resp. product of fractions f(n) is A165423(n+2), hence s(n) = sum(A165423(i+1)/A225157(i),i=1..n) = product(A165423(i+1)/A225157(i),i=1..n) = A165423(n+2)/a(n) = A176594(n-1)/a(n).

Examples

			f(n) = 5, 5/4, 25/21, 625/541, ...
5 + 5/4 = 5 * 5/4 = 25/4; 5 + 5/4 + 25/21 = 5 * 5/4 * 25/21 = 625/84; ...
s(n) = 1/b(n) = 5, 25/4, 625/84, ...
		

Crossrefs

Programs

  • Maple
    b:=proc(n) option remember; b(n-1)-b(n-1)^2; end:
    b(1):=1/5;
    a:=n->5^(2^(n-1))*b(n);
    seq(a(i),i=1..8);

Formula

a(n) = 5^(2^(n-1))*b(n) where b(n)=b(n-1)-b(n-1)^2 with b(1)=1/5.

A225165 Denominators of the sequence s(n) of the sum resp. product of fractions f(n) defined recursively by f(1) = 6/1; f(n+1) is chosen so that the sum and the product of the first n terms of the sequence are equal.

Original entry on oeis.org

1, 5, 155, 176855, 265770796655, 679134511201261085170655, 4943777738415359153962876938905400001585992709055
Offset: 1

Views

Author

Martin Renner, Apr 30 2013

Keywords

Comments

Numerators of the sequence s(n) of the sum resp. product of fractions f(n) is A165424(n+2), hence sum(A165424(i+1)/A225158(i),i=1..n) = product(A165424(i+1)/A225158(i),i=1..n) = A165424(n+2)/a(n) = A173501(n+2)/a(n).

Examples

			f(n) = 6, 6/5, 36/31, 1296/1141, ...
6 + 6/5 = 6 * 6/5 = 36/5; 6 + 6/5 + 36/31 = 6 * 6/5 * 36/31 = 1296/155; ...
s(n) = 1/b(n) = 6, 36/5, 1296/155, ...
		

Crossrefs

Programs

  • Maple
    b:=proc(n) option remember; b(n-1)-b(n-1)^2; end:
    b(1):=1/6;
    a:=n->6^(2^(n-1))*b(n);
    seq(a(i),i=1..8);

Formula

a(n) = 6^(2^(n-1))*b(n) where b(n)=b(n-1)-b(n-1)^2 with b(1)=1/6.

A225166 Denominators of the sequence s(n) of the sum resp. product of fractions f(n) defined recursively by f(1) = 7/1; f(n+1) is chosen so that the sum and the product of the first n terms of the sequence are equal.

Original entry on oeis.org

1, 6, 258, 552894, 2881632108858, 87461276190009420415561494, 88945179016152188483365571645414219233310820789054258
Offset: 1

Views

Author

Martin Renner, Apr 30 2013

Keywords

Comments

Numerators of the sequence s(n) of the sum resp. product of fractions f(n) is A165425(n+2), hence sum(A165425(i+1)/A225159(i),i=1..n) = product(A165425(i+1)/A225159(i),i=1..n) = A165425(n+2)/a(n).

Examples

			f(n) = 7, 7/6, 49/43, 2401/2143, ...
7 + 7/6 = 7 * 7/6 = 49/6; 7 + 7/6 + 49/43 = 7 * 7/6 * 49/43 = 2401/258; ...
s(n) = 1/b(n) = 7, 49/6, 2401/258, ...
		

Crossrefs

Programs

  • Maple
    b:=proc(n) option remember; b(n-1)-b(n-1)^2; end:
    b(1):=1/7;
    a:=n->7^(2^(n-1))*b(n);
    seq(a(i),i=1..8);

Formula

a(n) = 7^(2^(n-1))*b(n) where b(n)=b(n-1)-b(n-1)^2 with b(1)=1/7.

A225167 Denominators of the sequence s(n) of the sum resp. product of fractions f(n) defined recursively by f(1) = 8/1; f(n+1) is chosen so that the sum and the product of the first n terms of the sequence are equal.

Original entry on oeis.org

1, 7, 399, 1475103, 22572192792639, 5844003553148435725257076863, 428857285713570950220841681681938481172663051541516755199
Offset: 1

Views

Author

Martin Renner, Apr 30 2013

Keywords

Comments

Numerators of the sequence s(n) of the sum resp. product of fractions f(n) is A165426(n+2), hence sum(A165426(i+1)/A225160(i),i=1..n) = product(A165426(i+1)/A225160(i),i=1..n) = A165426(n+2)/a(n) = A167182(n+2)/a(n).

Examples

			f(n) = 8, 8/7, 64/57, 4096/3697, ...
8 + 8/7 = 8 * 8/7 = 64/7; 8 + 8/7 + 64/57 = 8 * 8/7 * 64/57 = 4096/399; ...
s(n) = 1/b(n) = 8, 64/7, 4096/399, ...
		

Crossrefs

Programs

  • Maple
    b:=proc(n) option remember; b(n-1)-b(n-1)^2; end:
    b(1):=1/8;
    a:=n->8^(2^(n-1))*b(n);
    seq(a(i),i=1..8);

Formula

a(n) = 8^(2^(n-1))*b(n) where b(n)=b(n-1)-b(n-1)^2 with b(1)=1/8.

A225168 Denominators of the sequence s(n) of the sum resp. product of fractions f(n) defined recursively by f(1) = 9/1; f(n+1) is chosen so that the sum and the product of the first n terms of the sequence are equal.

Original entry on oeis.org

1, 8, 584, 3490568, 138073441864904, 236788599971507074896206759048, 756988343475413525492604622110601759725560263205883476698184
Offset: 1

Views

Author

Martin Renner, Apr 30 2013

Keywords

Comments

Numerators of the sequence s(n) of the sum resp. product of fractions f(n) is A165427(n+2), hence sum(A165427(i+1)/A225161(i),i=1..n) = product(A165427(i+1)/A225161(i),i=1..n) = A165427(n+2)/a(n) = A165421(n+3)/a(n) = A011764(n)/a(n).

Examples

			f(n) = 9, 9/8, 81/73, 6561/5977, ...
9 + 9/8 = 9 * 9/8 = 81/8; 9 + 9/8 + 81/73 = 9 * 9/8 * 81/73 = 6561/584; ...
s(n) = 1/b(n) = 9, 81/8, 6561/584, ...
		

Crossrefs

Programs

  • Maple
    b:=proc(n) option remember; b(n-1)-b(n-1)^2; end:
    b(1):=1/9;
    a:=n->9^(2^(n-1))*b(n);
    seq(a(i),i=1..8);

Formula

a(n) = 9^(2^(n-1))*b(n) where b(n)=b(n-1)-b(n-1)^2 with b(1)=1/9.
Showing 1-10 of 11 results. Next