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

A105734 Duplicate of A076839.

Original entry on oeis.org

1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1
Offset: 1

Views

Author

Keywords

Comments

Previous name was: For n>2, a(n) > 0 is such that a(n-1)^2+4*a(n-2)*a(n) is a minimal square, with a(1)=1, a(2)=1.
The sequence depends on seed terms a(1) and a(2); if a(1)=1, a(3)=a(2)+1. All(?) sequences end with cycle={1,2,3,2,1} (or {2,4,6,4,2}, which essentially the same cycle) of length=5.

A105822 For n > 2, a(n) > 0 not appeared previously is such that a(n-1)^2+4*a(n-2)*a(n) = d^2 is a minimal square, a(1)=1, a(2)=2.

Original entry on oeis.org

1, 2, 3, 5, 8, 4, 12, 7, 10, 17, 6, 11, 21, 32, 13, 19, 14, 33, 20, 28, 24, 27, 42, 40, 18, 9, 35, 44, 39, 54, 48, 22, 15, 37, 52, 89, 30, 59, 23, 36, 99, 70, 16, 86, 47, 45, 92, 65, 157, 34, 123, 135, 222, 56, 136, 82, 29, 53, 102, 155, 25, 130, 87, 43, 170, 213, 63, 150, 57
Offset: 1

Views

Author

Zak Seidov, Apr 22 2005

Keywords

Comments

Is it a permutation of positive integers? Among first 2000 terms, first missing numbers are 233, 349, 394, 443, 449.
The sequence depends on seed terms a(1) and a(2); if a(1) = 1, a(3) = a(2)+1.
Values of d^2 in A105823.

Crossrefs

Cf. A076839, A105823, A104663 (putative inverse).

Programs

  • Maple
    N:= 1000: # to get a(1) to a(N)
    S:= 'S':
    a[1]:= 1: a[2]:= 2:
    S[1]:= 1: S[2]:= 1:
    for n from 3 to N do
      ds:= map(t -> rhs(op(t)), [msolve(x^2=a[n-1]^2, 4*a[n-2])]);
      xmin:= infinity;
      for d in ds do
        found:= false;
        for y from floor((a[n-1]-d)/(4*a[n-2]))+1 do
          xy:= 4*a[n-2]*y + d;
          cand:= (xy^2 - a[n-1]^2)/(4*a[n-2]);
          if cand >= xmin then found:= false; break fi;
          if not assigned(S[cand]) then found:= true; break fi;
        od:
        if found then xmin:= cand;  fi;
      od:
      a[n]:= xmin;
      S[xmin]:= 1;
    od:
    seq(a[n],n=1..N); # Robert Israel, May 11 2015
  • Mathematica
    a = {1, 2}; Do[i = 1; While[MemberQ[a, i] || !IntegerQ[Sqrt[a[[-1]]^2 + 4 a[[-2]]*i]], i++]; AppendTo[a, i], {n, 3, 70}]; a (* Ivan Neretin, May 11 2015 *)

A105736 For n>2, a(n) > 0 is such that a(n-1)^2+4*a(n-2)*a(n) is a minimal square, a(1)=1,a(2)=3.

Original entry on oeis.org

1, 3, 4, 4, 3, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2, 3, 2, 1, 1, 2
Offset: 1

Views

Author

Zak Seidov, Apr 19 2005

Keywords

Comments

The sequence depends on seed terms a(1) and a(2); if a(1)=1, a(3)=a(2)+1. All(?) sequences end with cycle={1,2,3,2,1} (or {2,4,6,4,2}, which essentially the same cycle) of length=5. This particular sequence merges with A076839, starting with 6th term = 1.

Crossrefs

Extensions

More terms from Ray Chandler, May 17 2024

A105746 a(n) = minimal c>0 such that (n+1)^2+4*n*c = d^2 is a square.

Original entry on oeis.org

3, 2, 4, 6, 8, 3, 12, 14, 16, 6, 20, 4, 24, 9, 7, 30, 32, 12, 36, 5, 8, 15, 44, 11, 48, 18, 52, 9, 56, 6, 60, 62, 15, 24, 20, 10, 72, 27, 16, 21, 80, 7, 84, 14, 11, 33, 92, 20, 96, 36, 23, 15, 104, 39, 12, 8, 24, 42, 116, 19, 120, 45, 39, 126, 35, 13, 132, 20, 31, 17, 140, 9, 144, 54
Offset: 1

Views

Author

Zak Seidov, Apr 19 2005

Keywords

Comments

There is a family of solutions c = 2*n - 2, d = 3*n-1, which gives maximums at graphic of function c(n).

Crossrefs

A271751 Period 10 zigzag sequence; repeat: [0, 1, 2, 3, 4, 5, 4, 3, 2, 1].

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5
Offset: 0

Views

Author

Wesley Ivan Hurt, Apr 13 2016

Keywords

Comments

Decimal expansion of 11111/900009. - Elmo R. Oliveira, Mar 03 2024

Crossrefs

Period k zigzag sequences: A000035 (k=2), A007877 (k=4), A260686 (k=6), A266313 (k=8), this sequence (k=10), A271832 (k=12), A279313 (k=14), A279319 (k=16), A158289 (k=18).

Programs

  • Magma
    &cat[[0, 1, 2, 3, 4, 5, 4, 3, 2, 1]: n in [0..10]];
    
  • Maple
    a:=n->[0, 1, 2, 3, 4, 5, 4, 3, 2, 1][(n mod 10)+1]: seq(a(n), n=0..100);
  • Mathematica
    CoefficientList[Series[x*(1 + x + x^2 + x^3 + x^4)/(1 - x + x^5 - x^6), {x, 0, 30}], x]
  • PARI
    a(n) = abs(n-10*round(n/10)); \\ Altug Alkan, Apr 13 2016

Formula

G.f.: x*(1 + x + x^2 + x^3 + x^4)/(1 - x + x^5 - x^6).
a(n) = a(n-1) - a(n-5) + a(n-6) for n>5.
a(n) = abs(n - 10*round(n/10)).
a(n) = Sum_{i=1..n} (-1)^floor((i-1)/5).
a(2n) = 2*abs(A117444(n)).
a(2n+7) = 2*A076839(n)-1 for n>0.
a(n) = a(n-10) for n >= 10. - Wesley Ivan Hurt, Sep 07 2022

A076844 a(1) = a(2) = a(3) = 1; a(n) = (a(n-1) + a(n-2) + 1)/a(n-3) (for n>3).

Original entry on oeis.org

1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1, 1, 1, 3, 5, 9, 5, 3, 1
Offset: 1

Views

Author

N. J. A. Sloane, Nov 21 2002

Keywords

Comments

Any sequence a(1),a(2),a(3),... defined by the recurrence a(n) = (a(n-1) + a(n-2) + 1)/a(n-3) (for n>3) has period 8. - James Propp, Nov 20 2002. This is the 8-cycle discovered by H. Todd - see Lyness, Note 1847. - N. J. A. Sloane, Jul 19 2020

Crossrefs

Programs

  • Maple
    a := 1; b := 1; c := 1; f := proc(n) option remember; global a,b,c; if n=1 then RETURN(a); fi; if n=2 then RETURN(b); fi; if n=3 then RETURN(c); fi; RETURN((f(n-1)+f(n-2)+1)/f(n-3)); end;
  • Mathematica
    nxt[{a_,b_,c_}]:={b,c,(b+c+1)/a}; Transpose[NestList[nxt,{1,1,1},110]][[1]] (* or *) PadRight[{},110,{1,1,1,3,5,9,5,3}] (* Harvey P. Dale, Jan 13 2015 *)
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 1},{1, 1, 1, 3, 5, 9, 5, 3},105] (* Ray Chandler, Aug 25 2015 *)

A276123 a(0) = a(1) = a(2) = 1; for n > 2, a(n) = (a(n-1) + 1)*(a(n-2) + 1) / a(n-3).

Original entry on oeis.org

1, 1, 1, 4, 10, 55, 154, 868, 2449, 13825, 39025, 220324, 621946, 3511351, 9912106, 55961284, 157971745, 891869185, 2517635809, 14213945668, 40124201194, 226531261495, 639469583290, 3610286238244, 10191389131441, 57538048550401, 162422756519761
Offset: 0

Views

Author

Bruno Langlois, Aug 21 2016

Keywords

Crossrefs

Programs

  • Magma
    I:=[1,1,1,4,10,55]; [n le 6 select I[n] else 17*Self(n-2)-17*Self(n-4)+Self(n-6): n in [1..30]]; // Vincenzo Librandi, Aug 27 2016
  • Mathematica
    LinearRecurrence[{0, 17, 0, -17, 0, 1}, {1, 1, 1, 4, 10, 55}, 40] (* Vincenzo Librandi, Aug 27 2016 *)
    nxt[{a_,b_,c_}]:={b,c,((c+1)(b+1))/a}; NestList[nxt,{1,1,1},30][[All,1]] (* Harvey P. Dale, Oct 01 2021 *)
  • PARI
    Vec((1+x-16*x^2-13*x^3+10*x^4+4*x^5)/((1-x)*(1+x)*(1-16*x^2+x^4)) + O(x^30)) \\ Colin Barker, Aug 21 2016
    

Formula

a(n) = (9-3*(-1)^n)/2*a(n-1) - a(n-2) - 1.
From Colin Barker, Aug 21 2016: (Start)
a(n) = 17*a(n-2) - 17*a(n-4) + a(n-6) for n > 5.
G.f.: (1 + x - 16*x^2 - 13*x^3 + 10*x^4 + 4*x^5) / ((1-x)*(1+x)*(1 - 16*x^2 + x^4)). (End)
a(2n+1) = A073352(n). a(2n) = A048907(n). - R. J. Mathar, Jul 04 2024

Extensions

More terms from Colin Barker, Aug 21 2016

A276175 a(n) = (a(n-1)+1)*(a(n-2)+1)*(a(n-3)+1)/a(n-4) with a(0) = a(1) = a(2) = a(3) = 1.

Original entry on oeis.org

1, 1, 1, 1, 8, 36, 666, 222111, 685187756, 2819713283228248, 644335913093223286486628176, 5604757351123068775966272886689217889936356651, 14861563788248216173988661093334637018340529129342104300621091389266132702213641
Offset: 0

Views

Author

Bruno Langlois, Aug 23 2016

Keywords

Comments

Conjecture: a(n) is an integer for all n >= 0. It has been checked by computer for n <= 40. A proof was proposed by 'mercio' as an answer to the MSE question, which however lacks details and heavily relies on computation. [Updated by Max Alekseyev, May 07 2023]

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n] == (a[n - 1] + 1) (a[n - 2] + 1) (a[n - 3] + 1)/a[n - 4],
    a[0] == a[1] == a[2] == a[3] == 1}, a, {n, 0, 12}] (* Michael De Vlieger, Aug 25 2016 *)
    a[ n_] := With[{m = Max[3 - n, n]}, If[ m < 4, 1, (a[m - 1] + 1) (a[m - 2] + 1) (a[m - 3] + 1)/a[m - 4]]]; (* Michael Somos, Jun 02 2019 *)
  • PARI
    a(n) = if (n <=3, 1, (a(n-1)+1)*(a(n-2)+1)*(a(n-3)+1)/a(n-4)); \\ Michel Marcus, Aug 23 2016
    
  • Ruby
    def A(m, n)
      a = Array.new(m, 1)
      ary = [1]
      while ary.size < n + 1
        i = a[1..-1].inject(1){|s, i| s * (i + 1)}
        break if i % a[0] > 0
        a = *a[1..-1], i / a[0]
        ary << a[0]
      end
      ary
    end
    def A276175(n)
      A(4, n)
    end # Seiichi Manyama, Aug 23 2016

Formula

Let b(n) = (b(n-1)*b(n-2)*b(n-3)+1)/b(n-4) with b(0) = 1/2, b(1) = 4, b(2) = b(3) = 1/2, then a(n) = b(n)*b(n+1)*b(n+2). - Seiichi Manyama, Sep 03 2016
The sequence 4*b(n) is given by A362884. Correspondingly, a(n) = A362884(n) * A362884(n+1) * A362884(n+2) / 64. - Max Alekseyev, May 07 2023
a(n) = a(3-n), 0 = a(n)*a(n+4)*(a(n+4)+1) - a(n+5)*a(n+1)*(a(n+1)+1) for all n in Z. - Michael Somos, Feb 23 2019
log(a(n)) ~ c * A289917^n, where c = 0.26774381278698... - Vaclav Kotesovec, Aug 27 2021

A076840 a(1) = a(2) = 1; a(n) = (a(n-1) + 1)/a(n-2) (for n>2, n odd), (a(n-1)^2 + 1)/a(n-2) (for n>2, n even).

Original entry on oeis.org

1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2, 5, 3, 2, 1, 1, 2
Offset: 1

Views

Author

N. J. A. Sloane, Nov 21 2002

Keywords

Comments

Any sequence a(1),a(2),a(3),... defined by the recurrence a(n) = (a(n-1)+1)/a(n-2) (for n>2, n odd), (a(n-1)^2+1)/a(n-2) (for n>2, n even) has period 6. The theory of cluster algebras currently being developed by Fomin and Zelevinsky gives a context for these facts, but it doesn't really explain them in an elementary way. - James Propp, Nov 20 2002

Crossrefs

Programs

  • Maple
    a := 1; b := 1; f := proc(n) option remember; global a,b; if n=1 then RETURN(a); fi; if n=2 then RETURN(b); fi; if n mod 2 = 1 then RETURN((f(n-1)+1)/f(n-2)); fi; RETURN((f(n-1)^2+1)/f(n-2)); end;
  • Mathematica
    LinearRecurrence[{0, 0, 0, 0, 0, 1}, {1, 1, 2, 5, 3, 2}, 105] (* Jean-François Alcover, Nov 22 2017 *)

A076841 a(1) = a(2) = 1; a(n) = (a(n-1)+1)/a(n-2) (for n>2, n odd), (a(n-1)^3+1)/a(n-2) (for n>2, n even).

Original entry on oeis.org

1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2, 9, 5, 14, 3, 2, 1, 1, 2
Offset: 1

Views

Author

N. J. A. Sloane, Nov 21 2002

Keywords

Comments

Any sequence a(1),a(2),a(3),... defined by the recurrence a(n) = (a(n-1)+1)/a(n-2) (for n>2, n odd), (a(n-1)^3+1)/a(n-2) (for n>2, n even) has period 8. The theory of cluster algebras currently being developed by Fomin and Zelevinsky gives a context for these facts, but it doesn't really explain them in an elementary way. - James Propp, Nov 20 2002

Crossrefs

Programs

  • Maple
    a := 1; b := 1; f := proc(n) option remember; global a,b; if n=1 then RETURN(a); fi; if n=2 then RETURN(b); fi; if n mod 2 = 1 then RETURN((f(n-1)+1)/f(n-2)); fi; RETURN((f(n-1)^3+1)/f(n-2)); end;
  • Mathematica
    LinearRecurrence[{0, 0, 0, 0, 0, 0, 0, 1},{1, 1, 2, 9, 5, 14, 3, 2},99] (* Ray Chandler, Aug 25 2015 *)
Showing 1-10 of 27 results. Next