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

A121253 a(n) = a(n-1)*a(n-3)+1 with a(0)=a(1)=a(2)=0.

Original entry on oeis.org

0, 0, 0, 1, 1, 1, 2, 3, 4, 9, 28, 113, 1018, 28505, 3221066, 3279045189, 93469183112446, 301070407771273987437, 987223472152664180906141290594, 92274971491542102812339702600558728264132925
Offset: 0

Views

Author

Jonathan Vos Post, Aug 22 2006

Keywords

Comments

Analog of A007660 a(n)=a(n-1)*a(n-2)+1. What is the equivalent continued fraction and asymptotic representation?

Crossrefs

Cf. A007660.

Programs

  • Magma
    I:=[0,0,0]; [n le 3 select I[n] else Self(n-1)*Self(n-3)+1: n in [1..20]]; // Vincenzo Librandi, Nov 14 2011
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==a[2]==0,a[n]==a[n-1]a[n-3]+1},a,{n,20}] (* Harvey P. Dale, Dec 30 2011 *)

Extensions

More terms from Vincenzo Librandi, Nov 14 2011

A121256 a(n) = a(n-1)*a(n-3) - 1, starting with a(0)=a(1)=a(2)=2.

Original entry on oeis.org

2, 2, 2, 3, 5, 9, 26, 129, 1160, 30159, 3890510, 4512991599, 136107313634240, 529526864767147062399, 2389750292138943783804215786000, 325262492519671886357848434144628838112639999
Offset: 0

Views

Author

Jonathan Vos Post, Aug 22 2006

Keywords

Comments

Analog of A055937 a(n) = a(n-1)*a(n-2) - 1. What is the equivalent continued fraction and asymptotic representation, by analogy to A007660 a(n) = a(n-1)*a(n-2) + 1 ?

Crossrefs

Programs

  • Magma
    I:=[2,2,2]; [n le 3 select I[n] else Self(n-1)*Self(n-3)-1: n in [1..20]]; // Vincenzo Librandi, Nov 14 2011
    
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==a[2]==2,a[n]==a[n-1]a[n-3]-1},a,{n,20}] (* Harvey P. Dale, Sep 02 2016 *)
  • PARI
    a(n) = if(n<3, 2, a(n-1)*a(n-3) - 1);
    vector(20, n, n--; a(n)) \\ G. C. Greubel, Jun 07 2019
    
  • Sage
    def a(n):
        if (n==0 or n==1 or n==2): return 2
        else: return a(n-1)*a(n-3) -1
    [a(n) for n in (0..20)] # G. C. Greubel, Jun 07 2019

Extensions

Corrected and extended by Vincenzo Librandi, Nov 14 2011

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

Original entry on oeis.org

2, 2, 5, 11, 56, 617, 34553, 21319202, 736642386707, 15704627843968647815, 11568694537326272321321120595206, 181682042349262169758803442669575561298555791374891, 2101824050856189730969091901210449068013789839106586804501928241686514359003372547
Offset: 0

Views

Author

Vincenzo Librandi, Sep 30 2015

Keywords

Crossrefs

Programs

  • Magma
    [n le 2 select 2 else Self(n-1)*Self(n-2)+1: n in [1..20]];
    
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==2, a[n]==a[n-1]*a[n-2] +1}, a, {n, 0, 20}]
  • PARI
    a(n) = if(n<2, 2, 1 + a(n-1)*a(n-2))
    vector(20, n, a(n-1)) \\ Altug Alkan, Sep 30 2015
    
  • PARI
    {a(n) = if( n<2, 2 * (n>=0), self()(n-1) * self()(n-2) + 1)}; /* Michael Somos, Oct 02 2015 */
    
  • Sage
    def a(n):
        if (n==0 or n==1): return 2
        else: return a(n-1)*a(n-2) +1
    [a(n) for n in (0..20)] # G. C. Greubel, Jun 07 2019

A356891 a(n) = a(n-1) * a(n-2) + 1 if n is even, otherwise a(n) = a(n-3) + 1, with a(0) = a(1) = 1.

Original entry on oeis.org

1, 1, 2, 2, 5, 3, 16, 6, 97, 17, 1650, 98, 161701, 1651, 266968352, 161702, 43169316455105, 266968353, 11524841314155180292066, 43169316455106, 497519521785644682185076928856988997, 11524841314155180292067
Offset: 0

Views

Author

J. Conrad, Sep 02 2022

Keywords

Examples

			For n=2, a(2) = a(0) * a(1) + 1 = 2.
For n=3, a(3) = a(0) + 1 = 2.
For n=4, a(4) = a(3) * a(2) + 1 = 5.
		

Crossrefs

Cf. A007660.

Programs

  • Mathematica
    a[n_] := a[n] = If[EvenQ[n], a[n - 1]*a[n - 2], a[n - 3]] + 1; a[0] = a[1] = 1; Array[a, 22, 0] (* Amiram Eldar, Sep 10 2022 *)
  • Python
    def A356891(length):
        output = [1] * length
        for n in range(2, length):
            output[n] += output[n-3] if n % 2 else output[n-1] * output[n-2]
        return output

A364663 a(n+1) = a(|n-a(n)*a(n-1)|)+1; a(0) = 0.

Original entry on oeis.org

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

Views

Author

Rok Cestnik, Aug 01 2023

Keywords

Comments

a(-1) can be set to any finite value and it does not affect the sequence.

Examples

			a(1) = a(|0-a(0)*____|)+1 = a(0)+1 = 1.
a(2) = a(|1-a(1)*a(0)|)+1 = a(1)+1 = 2.
a(3) = a(|2-a(2)*a(1)|)+1 = a(0)+1 = 1.
		

Crossrefs

Programs

  • PARI
    N=100; a=vector(N); a[2]=1; for(n=1,N-2,a[n+2]=a[1+abs(n-a[n]*a[n+1])]+1);
  • Python
    a=[0];
    for n in range(100):
        a.append(a[abs(n-a[n]*a[n-1])]+1)
    

Formula

a(n) ~ (3*n)^(1/3) (conjectured).
Previous Showing 11-15 of 15 results.