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 61-70 of 139 results. Next

A213437 Nonlinear recurrence: a(n) = a(n-1) + (a(n-1)+1)*Product_{j=1..n-2} a(j).

Original entry on oeis.org

1, 3, 7, 31, 703, 459007, 210066847231, 44127887746116242376703, 1947270476915296449559747573381594836628779007
Offset: 1

Views

Author

N. J. A. Sloane, Jun 11 2012

Keywords

Comments

This sequence was going to be included in the Aho-Sloane paper, but was omitted from the published version.
It appears that the sequence becomes periodic mod 10^k for any k, with period 3. The last digits are (1,3,7) repeated. Modulo 10^5 the sequence enters the cycle (56703, 79007, 23231) after the first 10 terms. - M. F. Hasler, Jul 23 2012. See also A214635, A214636.

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).

Crossrefs

Programs

  • Maple
    A213437 := proc(n)
            if n = 1 then 1;
            else procname(n-1)+(1+procname(n-1))*mul(procname(j),j=1..n-2);
            end if;
    end proc: # R. J. Mathar, Jul 23 2012
  • Mathematica
    RecurrenceTable[{a[n] == a[n-1]+(a[n-1]+1)*(a[n-1]-a[n-2])*a[n-2]/(a[n-2]+1),a[1]==1,a[2]==3},a,{n,1,10}] (* Vaclav Kotesovec, May 06 2015 *)
  • PARI
    a=[1];for(n=1,11,a=concat(a, a[n] + (a[n]+1) * prod(k=1,n-1, a[k] )));a \\ - M. F. Hasler, Jul 23 2012

Formula

a(n) = a(n-1)+(a(n-1)+1)*(a(n-1)-a(n-2))*a(n-2)/(a(n-2)+1). - Johan de Ruiter, Jul 23 2012
a(2+3k) = 9007 (mod 10^4) for all k>0. - M. F. Hasler, Jul 23 2012
a(n) ~ c^(2^n), where c = A076949 = 1.2259024435287485386279474959130085213212293209696612823177009... . - Vaclav Kotesovec, May 06 2015
a(n) = A001699(n)/A001699(n-1); a(n+1) - a(n) = A001699(n) + A001699(n-1); a(n) = A003095(n) + A003095(n-1). - Peter Bala, Feb 03 2017

Extensions

Definition recovered by Johan de Ruiter, Jul 23 2012

A348626 Greedy Egyptian fraction representation of 1 with square denominators.

Original entry on oeis.org

2, 2, 2, 3, 3, 7, 12, 49, 340, 6153, 362275, 234314697, 4303312007019, 8064823505928103487, 21034270897045389505182033301, 13184627067084215135862894820778146400791573, 36011454158212923548860166370685543204871921069986403871775848271, 6820216143160044256325325882329406136711110111012515344838677137010956148075846307036940303634819
Offset: 1

Views

Author

Max Alekseyev, Oct 25 2021

Keywords

Comments

Greedy representation 1 = 1/a(1)^2 + 1/a(2)^2 + ... constructed in a similar way to Sylvester's sequence (A000058). Let s(n) = Sum_{i=1..n} 1/a(i)^2, and let g(n) = 1 - s(n). Each a(n) is taken be the smallest positive integer satisfying s(n) < 1. [Revised by N. J. A. Sloane, Apr 20 2025]
Comment from David desJardins, Apr 20 2025 (Start)
We know that s(n) < 1 and s(n)-1/a(n)^2+1/(a(n)-1)^2 > 1. Then, arguing heuristically, the gap g(n) = 1-s(n) \approx 1/a(n+1)^2. This implies
0 < g(n) < 1/(a(n)-1)^2 - 1/a(n)^2 \approx 2/a(n)^3.
So a(n)^3/a(n+1)^2 should be roughly uniform on [0,2].
Let L(n) = ln(a(n)). Then 3*L(n) - 2*L(n+1) \approx ln(2) - e(n+1), where e(i) has an exponential distribution.
So L(n+1) \approx (3/2)*L(n) + (1/2)*(e(n+1)-ln(2)).
This gives us the conjecture that L(n) = C * (3/2)^n * (1+o(1)), as n -> oo.
The plot of L(n)*(2/3)^n (see link) shows that the conjecture is plausible, with C \approx 0.15113.
(End)

Crossrefs

Programs

  • PARI
    s=1; for(n=1,20, t=sqrtint(floor(1/s))+1; s-=1/t^2; print1(t,", "));
    
  • Python
    from math import isqrt
    from fractions import Fraction
    def A348626List():
        s = Fraction(1, 1)
        while True:
            t = isqrt(1 // s) + 1
            yield t
            s -= Fraction(1, t * t)
    a = A348626List()
    print([next(a) for  in range(18)])  # _Peter Luschny, Oct 26 2021

A001543 a(0) = 1, a(n) = 5 + Product_{i=0..n-1} a(i) for n > 0.

Original entry on oeis.org

1, 6, 11, 71, 4691, 21982031, 483209576974811, 233491495280173380882643611671, 54518278368171228201482876236565907627201914279213829353891
Offset: 0

Views

Author

Keywords

Comments

This is the special case k=5 of sequences with exact mutual k-residues. In general, a(1)=k+1 and a(n)=min{m | m>a(n-1), mod(m,a(i))=k, i=1,...,n-1}. k=1 gives Sylvester's sequence A000058 and k=2 Fermat sequence A000215. - Seppo Mustonen, Sep 04 2005

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=5 of A177888.

Programs

  • Mathematica
    Flatten[{1,RecurrenceTable[{a[1]==6, a[n]==a[n-1]*(a[n-1]-5)+5}, a, {n, 1, 10}]}] (* Vaclav Kotesovec, Dec 17 2014 *)
    Join[{1},NestList[#(#-5)+5&,6,10]] (* Harvey P. Dale, Oct 10 2016 *)
  • PARI
    {
      print1("1, 6");
      n=6;
      m=Mod(5,6);
      for(i=2,9,
        n=m.mod+lift(m);
        m=chinese(m,Mod(5,n));
        print1(", "n)
      )
    } \\ Charles R Greathouse IV, Dec 09 2011

Formula

a(n) = a(n-1) * (a(n-1) - 5) + 5. - Charles R Greathouse IV, Dec 09 2011
a(n) ~ c^(2^n), where c = 1.696053774403103324180661918166106455311376345474042496749974632237971081462... . - Vaclav Kotesovec, Dec 17 2014

Extensions

New name from Alonso del Arte, Dec 09 2011

A001544 A nonlinear recurrence: a(n) = a(n-1)^2 - 6*a(n-1) + 6, with a(0) = 1, a(1) = 7.

Original entry on oeis.org

1, 7, 13, 97, 8833, 77968897, 6079148431583233, 36956045653220845240164417232897, 1365749310322943329964576677590044473746108255675592519835615233
Offset: 0

Views

Author

Keywords

Comments

This is the special case k=6 of sequences with exact mutual k-residues. In general, a(1)=k+1 and a(n)=min{m | m>a(n-1), mod(m,a(i))=k, i=1,...,n-1}. k=1 gives Sylvester's sequence A000058 and k=2 Fermat sequence A000215. - Seppo Mustonen, Sep 04 2005

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column k=6 of A177888. - Alois P. Heinz, Nov 07 2012

Programs

  • Mathematica
    Flatten[{1,RecurrenceTable[{a[1]==7, a[n]==a[n-1]*(a[n-1]-6)+6}, a, {n, 1, 10}]}] (* Vaclav Kotesovec, Dec 17 2014 *)
    Join[{1},NestList[#^2-6#+6&,7,10]] (* Harvey P. Dale, Nov 19 2024 *)
  • PARI
    a(n)=if(n<1, n==0, if(n==1, 7, n=a(n-1); n^2-6*n+6))

Formula

a(n) ~ c^(2^n), where c = 1.76450357631319101484804524709844019487003729926754942591419313922841785792... . - Vaclav Kotesovec, Dec 17 2014

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

Original entry on oeis.org

0, 1, 2, 4, 12, 108, 10476, 108625644, 11798392680793836, 139202068568601568785946949658348, 19377215893777651167043206536157529523359277782016064519251404524
Offset: 0

Views

Author

Keywords

Comments

Also, numbers remaining after the following sieving process: In step 1, keep all numbers of the set N={0,1,2,...}. In step 2, keep only every second number after a(2)=2: N'={0,1,2,4,6,8,10,...}. In step 3, keep every 4th of the numbers following a(3)=4, N"={0,1,2,4,12,20,28,...}. In step 4, keep every 12th of the numbers beyond a(4)=12: {0,1,2,4,12,108,204,...}. In step 5, keep every 108th of the numbers beyond a(5)=108: {0,1,2,4,12,108,10476,...}, and so on. The next "gap" a(n+1)-a(n) is always a(n) times the former gap, i.e., a(n+1)-a(n) = a(n)*(a(n)-a(n-1)). - M. F. Hasler, Oct 28 2010
Number of plane trees where the root has fewer than n children and the i-th child of any node has fewer than i children. - David Eppstein, Dec 18 2021

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n)=A039941(2*n); first difference sequence of this sequence is A001697. - Michael Somos, May 19 2000

Programs

  • Haskell
    a001696 n = a001696_list !! n
    a001696_list = 0 : 1 : zipWith (-)
       (zipWith (+) a001696_list' $ map (^ 2) a001696_list')
       (zipWith (*) a001696_list a001696_list')
       where a001696_list' = tail a001696_list
    -- Reinhard Zumkeller, Apr 29 2013
  • Mathematica
    a[0] = 0; a[1] = 1; a[n_] := a[n] = a[n-1]*(1 + a[n-1] - a[n-2]); Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Jul 02 2013 *)
  • PARI
    a(n)=if(n<2,n>0,a(n-1)*(1+a(n-1)-a(n-2)))
    

Formula

a(n) ~ c^(2^n), where c = 1.15552822483840350150537253088299651035583896919522349372370013726451673646... . - Vaclav Kotesovec, May 21 2015

A001697 a(n+1) = a(n)(a(0) + ... + a(n)).

Original entry on oeis.org

1, 1, 2, 8, 96, 10368, 108615168, 11798392572168192, 139202068568601556987554268864512, 19377215893777651167043206536157390321290709180447278572301746176
Offset: 0

Views

Author

Keywords

Comments

Number of binary trees of height n where for each node the left subtree is at least as high as the right subtree. - Franklin T. Adams-Watters, Feb 08 2007
The next term (a(10)) has 129 digits. - Harvey P. Dale, Jan 24 2016
Number of plane trees where the root has exactly n children and the i-th child of any node has at most i-1 children. - David Eppstein, Dec 18 2021

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

a(n) = A039941(2*n+1); first differences of A001696 give this sequence.
Cf. A064847.

Programs

  • Haskell
    a001697 n = a001697_list !! n
    a001697_list = 1 : 1 : f [1,1] where
       f xs@(x:_) = y : f (y : xs) where y = x * sum xs
    -- Reinhard Zumkeller, Apr 29 2013
    
  • Magma
    [n le 2 select 1 else Self(n-1)^2*(1+1/Self(n-2)): n in [1..12]]; // Vincenzo Librandi, Nov 25 2015
  • Mathematica
    a[0] = 1; a[1] = 1; a[n_] := a[n] = a[n - 1]^2*(1 + 1/a[n - 2]); Table[a[n], {n, 0, 9}]  (* Jean-François Alcover, Jul 02 2013 *)
    nxt[{t_,a_}]:={t+t*a,t*a}; Transpose[NestList[nxt,{1,1},10]][[2]] (* Harvey P. Dale, Jan 24 2016 *)
  • PARI
    a(n)=if(n<2,n >= 0,a(n-1)^2*(1+1/a(n-2)))
    

Formula

a(n) ~ c^(2^n), where c = 1.3352454783981919948826893254756974184778316104856161827213437094446034867599... . - Vaclav Kotesovec, May 21 2015

Extensions

Additional comments from Michael Somos, May 19 2000

A053630 Pythagorean spiral: a(n-1), a(n)-1 and a(n) are sides of a right triangle.

Original entry on oeis.org

3, 5, 13, 85, 3613, 6526885, 21300113901613, 226847426110843688722000885, 25729877366557343481074291996721923093306518970391613
Offset: 1

Views

Author

Henry Bottomley, Mar 21 2000

Keywords

Comments

Least prime factors of a(n): 3, 5, 13, 5, 3613, 5, 233, 5, 3169, 5, 101, 5, 29, 5, 695838629, 5, 1217, 5, 2557, 5, 101, 5, 769, 5. - Zak Seidov, Nov 11 2013

Examples

			a(3)=13 because 5,12,13 is a Pythagorean triple and a(2)=5.
		

References

  • R. Gelca and T. Andreescu, Putnam and Beyond, Springer 2007, p. 121.

Crossrefs

See also A018928, A180313 and A239381 for similar sequences with a(n) a leg and a(n+1) the hypotenuse of a Pythagorean triangle.
Cf. A077125, A117191 (4^(1/Pi)).

Programs

  • Maple
    A:= proc(n) option remember; (procname(n-1)^2+1)/2 end proc: A(1):= 3:
    seq(A(n),n=1..10); # Robert Israel, Jul 14 2014
  • Mathematica
    NestList[(#^2+1)/2&,3,10] (* Harvey P. Dale, Sep 15 2011 *)
  • PARI
    {a(n) = if( n>1, (a(n-1)^2 + 1) / 2, 3)}; /* Michael Somos, May 15 2011 */

Formula

a(1) = 3, a(n) = (a(n-1)^2 + 1)/2 for n > 1.
a(n) = 2*A000058(n)-1 = A053631(n)+1 = floor(2 * 1.597910218031873...^(2^n)). Constructing the spiral as a sequence of triangles with one vertex at the origin, then for large n the other vertices are close to lying on the doubly logarithmic spiral r = 2*2.228918357655...^(1.5546822754821...^theta) where theta(n) = n*Pi/2 - 1.215918200344... and 1.5546822754821... = 4^(1/Pi).
a(1) = 3, a(n+1) = (1/4)*((a(n)-1)^2 + (a(n)+1)^2). - Amarnath Murthy, Aug 17 2005
a(n)^2 - (a(n)-1)^2 = a(n-1)^2, so 2*a(n)-1 = a(n-1)^2 (see the first formula). - Thomas Ordowski, Jul 13 2014
a(n) = (A006892(n+2) + 3)/2. - Thomas Ordowski, Jul 14 2014
a(n)^2 = A006892(n+3) + 2. - Thomas Ordowski, Jul 19 2014

Extensions

Corrected and extended by James Sellers, Mar 22 2000

A077496 Decimal expansion of lim_{n -> infinity} A001699(n)^(1/2^n).

Original entry on oeis.org

1, 5, 0, 2, 8, 3, 6, 8, 0, 1, 0, 4, 9, 7, 5, 6, 4, 9, 9, 7, 5, 2, 9, 3, 6, 4, 2, 3, 7, 3, 2, 1, 6, 9, 4, 0, 8, 7, 3, 8, 8, 7, 1, 7, 4, 3, 9, 6, 3, 5, 7, 9, 3, 0, 6, 9, 9, 0, 6, 7, 1, 4, 2, 4, 3, 0, 8, 4, 7, 1, 9, 7, 8, 7, 1, 7, 5, 7, 6, 6, 0, 1, 9, 4, 5, 6, 6, 3, 3, 3, 9, 1, 7, 8, 6, 3, 0, 6, 1, 9, 8, 7, 2, 3, 7
Offset: 1

Views

Author

Benoit Cloitre, Dec 01 2002

Keywords

Examples

			1.5028368010497564997529364237321694087388717439635793069906714243...
		

References

  • Steven R. Finch, Mathematical Constants, Cambridge University Press, 2003, Section 6.10 Quadratic recurrence constants, p. 443.

Crossrefs

Programs

  • Magma
    function A003095(n)
      if n eq 0 then return 0;
      else return 1 + A003095(n-1)^2;
      end if; return A003095;
    end function;
    function S(n)
      if n eq 1 then return Log(2)/2;
      else return S(n-1) + Log(1 + 1/A003095(n)^2)/2^n;
      end if; return S;
    end function;
    SetDefaultRealField(RealField(120)); Exp(S(12)); // G. C. Greubel, Nov 29 2022
    
  • Mathematica
    digits = 105; Clear[b, beta]; b[0] = 1; b[n_] := b[n] = b[n-1]^2 + 1; b[10]; beta[n_] := beta[n] = b[n]^(2^(-n)); beta[5]; beta[n = 6]; While[ RealDigits[beta[n], 10, digits+5] != RealDigits[beta[n-1], 10, digits+5], Print["n = ", n]; n = n+1]; RealDigits[beta[n], 10, digits] // First (* Jean-François Alcover, Jun 18 2014 *)
    (* Second program *)
    A003095[n_]:= A003095[n]= If[n==0, 0, 1 + A003095[n-1]^2];
    S[n_]:= S[n]= If[n==1, Log[2]/2, S[n-1] + Log[1 + 1/A003095[n]^2]/2^n];
    RealDigits[Exp[S[13]], 10, 120][[1]] (* G. C. Greubel, Nov 29 2022 *)
  • SageMath
    @CachedFunction
    def A003095(n): return 0 if (n==0) else 1 + A003095(n-1)^2
    @CachedFunction
    def S(n): return log(2)/2 if (n==1) else S(n-1) + log(1 + 1/(A003095(n))^2)/2^n
    numerical_approx( exp(S(12)), digits=120) # G. C. Greubel, Nov 29 2022

Formula

Equals A076949^2. - Vaclav Kotesovec, Dec 17 2014
Equals exp(Sum_{k>=1} log(1+1/A003095(k)^2)/2^k) (Aho and Sloane, 1973). - Amiram Eldar, Feb 02 2022

A144744 Recurrence sequence a(n)=a(n-1)^2-a(n-1)-1, a(0)=4.

Original entry on oeis.org

4, 11, 109, 11771, 138544669, 19194625169774891, 368433635408155743950638444286989, 135743343700069833946317076518699443524748244656296738254150399131
Offset: 0

Views

Author

Artur Jasinski, Sep 20 2008

Keywords

Comments

a(0)=3 is the smallest integer generating an increasing sequence of the form a(n)=a(n-1)^2-a(n-1)-1.

Crossrefs

Programs

  • Mathematica
    a = {}; k = 4; Do[k = k^2 - k - 1; AppendTo[a, k], {n, 1, 10}]; a
  • PARI
    a(n, s=4)={for(i=1, n, s=s^2-s-1); s} \\ M. F. Hasler, Oct 06 2014

Formula

a(n)=a(n-1)^2-a(n-1)-1 and a(0)=4.
a(n) ~ c^(2^n), where c = 3.22737450272053234771396610986262048906046050824600724014923334412606964... . - Vaclav Kotesovec, May 06 2015

Extensions

Edited by M. F. Hasler, Oct 06 2014

A144745 Recurrence sequence a(n)=a(n-1)^2-a(n-1)-1, a(0)=9.

Original entry on oeis.org

9, 71, 4969, 24685991, 609398126966089, 371366077149776919833628989831, 137912763257614063309949706968500684963726537144819872418729
Offset: 0

Views

Author

Artur Jasinski, Sep 20 2008

Keywords

Comments

The original version of this sequence had a(0)=5=A144743(1) and therefore was essentially the same as that sequence A144743.
The next term a(8) has 119 digits.

Crossrefs

Programs

  • Mathematica
    k = 9; a = {k}; Do[k = k^2 - k - 1; AppendTo[a, k], {n, 1, 10}]; a
    NestList[#^2 - # - 1 &, 9, 7]  (* Harvey P. Dale, Feb 04 2011 *)
  • PARI
    a(n,s=9)=for(i=1,n,s=s^2-s-1);s \\ M. F. Hasler, Oct 06 2014

Formula

a(n) = a(n-1)^2-a(n-1)-1 and a(0)=9.
a(n) ~ c^(2^n), where c = 8.395688554881795978328174160925857176207363473280394010762212170489... . - Vaclav Kotesovec, May 06 2015

Extensions

New initial value a(0)=9 from M. F. Hasler, Oct 20 2014
Previous Showing 61-70 of 139 results. Next