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 10 results.

A005246 a(n) = (1 + a(n-1)*a(n-2))/a(n-3), a(0) = a(1) = a(2) = 1.

Original entry on oeis.org

1, 1, 1, 2, 3, 7, 11, 26, 41, 97, 153, 362, 571, 1351, 2131, 5042, 7953, 18817, 29681, 70226, 110771, 262087, 413403, 978122, 1542841, 3650401, 5757961, 13623482, 21489003, 50843527, 80198051, 189750626, 299303201, 708158977, 1117014753
Offset: 0

Views

Author

Keywords

Comments

For n >= 4 we have the linear recurrence a(n) = 4*a(n-2) - a(n-4). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jun 04 2001
Integer solutions to the equation floor(sqrt(3)*x^2) = x*floor(sqrt(3)*x). - Benoit Cloitre, Mar 18 2004
For n > 2, a(n) is the smallest integer > a(n-1) such that sqrt(3)*a(n) is closer to and greater than an integer than sqrt(3)*a(n-1). I.e., a(n) is the smallest integer > a(n-1) such that frac(sqrt(3)*a(n)) < frac(sqrt(3)*a(n-1)). - Benoit Cloitre, Jan 20 2003
The lower principal and intermediate convergents to 3^(1/2), beginning with 1/1, 3/2, 5/3, 12/7, 19/11, form a strictly increasing sequence; essentially, numerators=A143643 and denominators=A005246. - Clark Kimberling, Aug 27 2008
This sequence is a particular case of the following situation: a(0)=1, a(1)=a, a(2)=b with the recurrence relation a(n+3)=(a(n+2)*a(n+1)+q)/a(n) where q is given in Z to have Q=(a*b^2+q*b+a+q)/(a*b) itself in Z. The g.f. is f: f(z)=(1+a*z+(b-Q)*z^2+(a*b+q-a*Q)*z^3)/(1-Q*z^2+z^4); so we have the linear recurrence: a(n+4)=Q*a(n+2)-a(n). The general form of a(n) is given by: a(2*m) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (b-Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p) and a(2*m+1) = a*Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*Q^(m-2*p) + (a*b+q-a*Q)*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p). - Richard Choulet, Feb 24 2010
a(n) for n > 1 are the integer square roots of (floor(m^2/3)+1), where the values of m are given by A143643. Also see A082630. - Richard R. Forberg, Nov 14 2013
The a(n) = (1 + a(n-1)*a(n-2))/a(n-3) recursion has the Laurent property. If a(0), a(1), a(2) are variables, then a(n) is a Laurent polynomial (a rational function with a monomial denominator). - Michael Somos, Feb 27 2019

Examples

			G.f. = 1 + x + x^2 + 2*x^3 + 3*x^4 + 7*x^5 + 11*x^6 + 26*x^7 + 41*x^8 + ...
From _Richard Choulet_, Feb 24 2010: (Start)
a(4) = 4^2 - 4^0 - 3*4^1 = 3.
a(7) = 4^3 - 4*binomial(2,1) - 2*(4^2-1) = 26. (End)
		

References

  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Bisections are A001835 and A001075.
Cf. A101265. Row sums of A211956.
Cf. A001353.

Programs

  • Haskell
    a005246 n = a005246_list !! n
    a005246_list = 1 : 1 : 1 : map (+ 1) (zipWith div
       (zipWith (*) (drop 2 a005246_list) (tail a005246_list)) a005246_list)
    -- Reinhard Zumkeller, Mar 07 2012
  • Maple
    A005246:=-(-1-z+2*z**2+z**3)/(1-4*z**2+z**4); # Conjectured by Simon Plouffe in his 1992 dissertation. Gives sequence except for one of the leading 1's.
    for q from 1 to 10 do :a:=1:b:=1:Q:=(a*b^2+q*b+a+q)/(a*b): for m from 0 to 15 do U(m):=sum((-1)^p*binomial(m-p,p)*Q^(m-2*p),p=0..floor(m/2))+(b-Q)*sum((-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p),p=0..floor((m-1)/2)):od: for m from 0 to 15 do V(m):=a*sum((-1)^p*binomial(m-p,p)*Q^(m-2*p),p=0..floor(m/2))+(a*b+q-a*Q)*sum((-1)^p*binomial(m-1-p,p)*Q^(m-1-2*p),p=0..floor((m-1)/2)):od:for m from 0 to 15 do W(2*m):=U(m):od:for m from 0 to 14 do W(2*m+1):=V(m):od:seq(W(m),m=0..30):od; # Richard Choulet, Feb 24 2010
  • Mathematica
    RecurrenceTable[{a[0]==a[1]==a[2]==1,a[n]==(1+a[n-1]a[n-2])/a[n-3]},a,{n,40}] (* Harvey P. Dale, May 28 2013 *)
    a[n_] := Cosh[(n-1)*ArcSinh[1/Sqrt[2]]]*If[EvenQ[n], Sqrt[2/3], 1]; Table[a[n] // FunctionExpand, {n, 0, 34}] (* Jean-François Alcover, Dec 10 2014, after Peter Bala *)
    a[ n_] := With[{m = If[ n < 0, 2 - n, n]}, SeriesCoefficient[ (1 + x - 3 x^2 - 2 x^3) / (1 - 4 x^2 + x^4), {x, 0, m}]]; (* Michael Somos, Feb 10 2017 *)
  • PARI
    {a(n) = if( n<0, n = 2 - n); polcoeff((1 + x - 3*x^2 - 2*x^3) / (1 - 4*x^2 + x^4) + x * O(x^n), n)}; /* Michael Somos, Nov 15 2006 */
    
  • PARI
    {a(n) = real( (2 + quadgen(12))^(n\2) * if( n%2, 1, 1 - 1 / quadgen(12)) )}; /* Michael Somos, May 24 2012 */
    

Formula

G.f.: (1 + x - 3*x^2 - 2*x^3)/(1 - 4*x^2 + x^4).
Limit_{n->oo} a(2n+1)/a(2n) = (3+sqrt(3))/3 = 1.5773502...; lim_{n->oo} a(2n)/a(2n-1) = (3+sqrt(3))/2 = 2.3660254.... - Benoit Cloitre, Aug 07 2002
A101265(n) = a(n)*a(n+1). - Franklin T. Adams-Watters, Apr 24 2006
a(n) = a(2-n) for all n in Z. - Michael Somos, Nov 15 2006
a(2*n + 1) = A001075(n). a(2*n) = A001835(n). a(2*n + 1) - a(2*n) = a(2*n + 2) - a(2*n + 1) = A001353(n). - Michael Somos, May 24 2012
For n > 2: a(n) = a(n-1) + Sum_{k=1..floor((n-1)/2)} a(2*k). - Reinhard Zumkeller, Dec 16 2007
From Richard Choulet, Feb 24 2010: (Start)
a(2*m) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*4^(m-2*p) - 3*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*4^(m-1-2*p).
a(2*m+1) = Sum_{p=0..floor(m/2)} (-1)^p*binomial(m-p,p)*4^(m-2*p) - 2*Sum_{p=0..floor((m-1)/2)} (-1)^p*binomial(m-1-p,p)*4^(m-1-2*p). (End)
From Tim Monahan, Jul 01 2011: (Start)
Closed form without extra leading 1: ((sqrt(6)+3)*(sqrt(2+sqrt(3))^n+(sqrt(2-sqrt(3))^n))+(3-sqrt(6))*((-sqrt(2+sqrt(3)))^n+(-sqrt(2-sqrt(3)))^n))/12.
Closed form with extra leading 1: ((6+3*sqrt(6)-2*sqrt(3)-3*sqrt(2))*(sqrt(2+sqrt(3))^n)+(6+3*sqrt(6)+2*sqrt(3)+3*sqrt(2))*(sqrt(2-sqrt(3))^n)+(6-3*sqrt(6)-2*sqrt(3)+3*sqrt(2))*((-sqrt(2+sqrt(3)))^n)+(6-3*sqrt(6)+2*sqrt(3)-3*sqrt(2))*((-sqrt(2-sqrt(3)))^n))/24. (End)
a(2*n+2) = Sum_{k = 0..n} 2^k*binomial(n+k,2*k); a(2*n+1) = Sum_{k = 0..n} n/(n+k)*2^k*binomial(n+k,2*k) for n >= 1. Row sums of A211956. - Peter Bala, May 01 2012
a(n) = ((sqrt(2)+sqrt(3)+(-1)^n*(sqrt(2)-sqrt(3)))*sqrt(2+(2-sqrt(3))^n*(2+ sqrt(3))-(-2+sqrt(3))*(2+ sqrt(3))^n))/(4*sqrt(3)). - Gerry Martens, Jun 06 2015
0 = a(n) - 2*a(n+1) + a(n+2) if n is even, 0 = a(n) - 3*a(n+1) + a(n+2) if n is odd for all n in Z. - Michael Somos, Feb 10 2017

Extensions

More terms from Michael Somos, Aug 01 2001

A032908 One of four 3rd-order recurring sequences for which the first derived sequence and the Galois transformed sequence coincide.

Original entry on oeis.org

2, 2, 3, 6, 14, 35, 90, 234, 611, 1598, 4182, 10947, 28658, 75026, 196419, 514230, 1346270, 3524579, 9227466, 24157818, 63245987, 165580142, 433494438, 1134903171, 2971215074, 7778742050, 20365011075, 53316291174, 139583862446, 365435296163, 956722026042
Offset: 0

Views

Author

Michele Elia (elia(AT)polito.it)

Keywords

Comments

a(n) is also a sequence with the property that the difference between the sum and product of two consecutive terms is equal to the square of the difference between those terms, i.e., a(n)*a(n+1) - (a(n)+ a(n+1)) = (a(n) - a(n + 1))^2. The difference between those two terms, a(n + 1) - a(n) = F(2n -2), the (2n - 2)th Fibonacci number. - John Baker, May 18 2010
Conjecture: consecutive terms of this sequence and consecutive terms of A101265 provide all the positive integer solutions of (a+b)*(a+b+1) == 0 (mod (a*b)). - Robert Israel, Aug 26 2015
Conjecture is true: see Mathematics Stack Exchange link. - Robert Israel, Sep 06 2015
Consecutive terms of this sequence and consecutive terms of A101879 provide all the positive integer pairs for which K = (a+1)/b + (b+1)/a is an integer. For this sequence, K = 3. - Andrey Vyshnevyy, Sep 18 2015

References

  • L. E. Dickson, History of the Theory of Numbers, Dover, New York, 1971.

Crossrefs

Programs

  • Magma
    [2] cat [n le 1 select 2 else Floor((3*Self(n-1) + Sqrt(5*Self(n-1)^2 - 10*Self(n-1) + 1) - 1)/2): n in [1..30]]; // Vincenzo Librandi, Aug 27 2015
  • Maple
    f:= proc(n) option remember; local x;
      x:= procname(n-1); (3*x + sqrt(5*x^2 - 10*x + 1) - 1)/2 end proc:
    f(0):= 2: f(1):= 2:
    map(f, [$0..30]); # Robert Israel, Aug 26 2015
  • Mathematica
    Table[Fibonacci[2 n - 1] + 1, {n, 0, 27}] (* Michael De Vlieger, Aug 26 2015 *)
    LinearRecurrence[{4,-4,1},{2,2,3},40] (* Harvey P. Dale, Apr 11 2018 *)
  • PARI
    Vec((2-6*x+3*x^2)/(1-4*x+4*x^2-x^3)+O(x^66)) \\ Joerg Arndt, Jul 02 2013
    

Formula

G.f.: (2 - 6*x + 3*x^2)/((1 - x)*(1 - 3*x + x^2)).
a(n) = 4*a(n-1) - 4*a(n-2) + a(n-3).
a(n) = Fibonacci(2*n-1) + 1 = A001519(n) + 1. - Vladeta Jovovic, Mar 19 2003
a(n) = 3*a(n - 1) - a(n - 2) - 1. - N. Sato, Jan 21 2010
From Wolfdieter Lang, Aug 27 2014: (Start)
a(n) = 1 + S(n-1, 3) - S(n-2, 3) = 1 + A001519(n), with Chebyshev S-polynomials (see A049310). For n < 0, we have S(-1, x) = 0 and S(-2, x) = -1.
This follows from the partial fraction decomposition of the g.f., 1/(1 - x) + (1 - 2*x)/ (1 - 3*x + x^2), using the recurrence for S, or from A001519. (End)
From Robert Israel, Aug 26 2015: (Start)
(a(n) + a(n+1))*(a(n) + a(n+1) + 1) = 5*a(n)*a(n+1).
a(n+1) = (3*a(n) + sqrt(5*a(n)^2 - 10*a(n) + 1) - 1)/2 for n >= 1. (End)
a(n) = 1 + (2^(-1-n) * ((3 - sqrt(5))^n * (1 + sqrt(5)) + (-1 + sqrt(5)) * (3 + sqrt(5))^n)) / sqrt(5). - Colin Barker, Nov 02 2016
Sum_{n>=0} 1/a(n) = phi (A001622). - Amiram Eldar, Oct 05 2020
Product_{n>=1} (1 + 1/a(n)) = (3+sqrt(5))/2 = phi^2 (A104457). - Amiram Eldar, Nov 28 2024

Extensions

More terms from Ralf Stephan, Mar 10 2003
Index for Chebyshev polynomials and cross reference added by Wolfdieter Lang, Aug 27 2014

A275173 a(n) = (a(n-3) + a(n-1) * a(n-5)) / a(n-6), a(0) = a(1) = ... = a(5) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 2, 3, 4, 6, 9, 22, 36, 51, 82, 129, 321, 529, 753, 1217, 1921, 4786, 7891, 11236, 18166, 28681, 71462, 117828, 167779, 271266, 428289, 1067137, 1759521, 2505441, 4050817, 6395649, 15935586, 26274979, 37413828, 60490982, 95506441, 237966646
Offset: 0

Views

Author

Seiichi Manyama, Jul 19 2016

Keywords

Comments

Inspired by A048736.

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n] == (a[n - 3] + a[n - 1] a[n - 5])/a[n - 6], a[1] == 1, a[2] == 1, a[3] == 1, a[4] == 1, a[5] == 1, a[6] == 1}, a, {n, 42}] (* or *)
    CoefficientList[Series[(1 + x + x^2 + x^3 + x^4 - 15 x^5 - 14 x^6 - 13 x^7 - 12 x^8 - 10 x^9 + 9 x^10 + 6 x^11 + 4 x^12 + 3 x^13 + 2 x^14)/((1 - x) (1 + x + x^2 + x^3 + x^4) (1 - 15 x^5 + x^10)), {x, 0, 41}], x] (* Michael De Vlieger, Jul 19 2016 *)
    nxt[{a_,b_,c_,d_,e_,f_}]:={b,c,d,e,f,(d+f*b)/a}; NestList[nxt,{1,1,1,1,1,1},50][[;;,1]] (* Harvey P. Dale, Jan 06 2024 *)
  • PARI
    Vec((1 +x +x^2 +x^3 +x^4 -15*x^5 -14*x^6 -13*x^7 -12*x^8 -10*x^9 +9*x^10 +6*x^11 +4*x^12 +3*x^13 +2*x^14) / ((1 -x)*(1 +x +x^2 +x^3 +x^4)*(1 -15*x^5 +x^10)) + O(x^50)) \\ Colin Barker, Jul 19 2016
  • Ruby
    def A(k, l, n)
      a = Array.new(k * 2, 1)
      ary = [1]
      while ary.size < n + 1
        break if (a[1] * a[-1] + a[k] * l) % a[0] > 0
        a = *a[1..-1], (a[1] * a[-1] + a[k] * l) / a[0]
        ary << a[0]
      end
      ary
    end
    def A275173(n)
      A(3, 1, n)
    end
    

Formula

G.f.: (1 +x +x^2 +x^3 +x^4 -15*x^5 -14*x^6 -13*x^7 -12*x^8 -10*x^9 +9*x^10 +6*x^11 +4*x^12 +3*x^13 +2*x^14) / ((1 -x)*(1 +x +x^2 +x^3 +x^4)*(1 -15*x^5 +x^10)). - Colin Barker, Jul 19 2016
a(n) = 16*a(n-5) - 16*a(n-10) + a(n-15). - G. C. Greubel, Jul 20 2016

A182756 Numbers k > 1 such that are sequences B_k of type: {b(1) = 1, b(2) = k, for n >= 3; b(n) = the smallest number h > b(n-1) such that [[b(n-2) + b(n-1)] * [b(n-2) + h] * [b(n-1) + h]] / [b(n-2) * b(n-1) * h] is an integer}.

Original entry on oeis.org

2, 3, 6, 14, 21, 35, 77, 90, 234, 286, 611
Offset: 1

Views

Author

Jaroslav Krizek, Nov 27 2010

Keywords

Comments

With 1 complement of A182757.
Is this a union/superset of A032908 and A101879? - Ralf Stephan, Nov 29 2010

Examples

			For n =1; a(n) = 2; B_2 = A038754(n): 1, 2, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, …
For n =2; a(n) = 3; B_3 = A182751(n): 1, 3, 6, 9, 18, 27, 54, 81, 162, 243, 486, …
For n =3; a(n) = 6; B_6 = A182752(n): 1, 6, 14, 84, 196, 1176, 2744, 16464, 38416, …
For n =4; a(n) = 14; B_14 = A182753(n): 1, 14, 35, 490, 1225, 17150, 42875, …
For n =5; a(n) = 21; B_21 = A182754(n): 1, 21, 77, 1617, 5929, 124509, 456533, …
For n =6; a(n) = 35; B_35 = A182755(n): 1, 35, 90, 3150, 8100, 283500, 729000, …
		

Crossrefs

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

Original entry on oeis.org

1, 1, 1, 4, 22, 526, 69427, 219111589, 91273561736491, 119994570874632853695766, 65713991236617279734602790963627271046, 47311933073383646516067037755547920981262829886906923065810924
Offset: 0

Views

Author

Bruno Langlois, Aug 21 2016

Keywords

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n] == (a[n - 1]^2 + a[n - 2]^2 + a[n - 1] + a[n - 2])/a[n - 3], a[0] == a[1] == a[2] == 1}, a, {n, 0, 11}] (* Michael De Vlieger, Aug 21 2016 *)

Formula

a(n) = 6*a(n-1)*a(n-2)-a(n-3)-1.
a(n) ~ 1/6 * c^(phi^n), where c = 2.059783590102273... and phi = A001622 = (1+sqrt(5))/2 is the golden ratio. - Vaclav Kotesovec, Mar 20 2017

Extensions

a(10) corrected by Seiichi Manyama, Aug 21 2016

A275174 a(n) = (a(n-4) + a(n-1) * a(n-7)) / a(n-8), a(0) = a(1) = ... = a(7) = 1.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 4, 5, 7, 10, 14, 33, 53, 74, 96, 141, 209, 300, 714, 1151, 1611, 2094, 3083, 4578, 6579, 15665, 25257, 35355, 45959, 67673, 100497, 144431, 343906, 554491, 776186, 1008991, 1485711, 2206346, 3170896, 7550257, 12173533, 17040724
Offset: 0

Views

Author

Seiichi Manyama, Jul 19 2016

Keywords

Comments

Inspired by A048736.

Crossrefs

Programs

  • Mathematica
    RecurrenceTable[{a[n] == (a[n - 4] + a[n - 1] a[n - 7])/a[n - 8], a[1] == 1, a[2] == 1, a[3] == 1, a[4] == 1, a[5] == 1, a[6] == 1, a[7] == 1, a[8] == 1}, a, {n, 42}] (* Michael De Vlieger, Jul 19 2016 *)
  • PARI
    Vec((1 +x +x^2 +x^3 +x^4 +x^5 +x^6 -22*x^7 -21*x^8 -20*x^9 -19*x^10 -18*x^11 -16*x^12 -13*x^13 +14*x^14 +10*x^15 +7*x^16 +5*x^17 +4*x^18 +3*x^19 +2*x^20) / ((1 -x)*(1 +x +x^2 +x^3 +x^4 +x^5 +x^6)*(1 -22*x^7 +x^14)) + O(x^20)) \\ Colin Barker, Jul 19 2016
  • Ruby
    def A(k, l, n)
      a = Array.new(k * 2, 1)
      ary = [1]
      while ary.size < n + 1
        break if (a[1] * a[-1] + a[k] * l) % a[0] > 0
        a = *a[1..-1], (a[1] * a[-1] + a[k] * l) / a[0]
        ary << a[0]
      end
      ary
    end
    def A275174(n)
      A(4, 1, n)
    end
    

Formula

G.f.: (1 +x +x^2 +x^3 +x^4 +x^5 +x^6 -22*x^7 -21*x^8 -20*x^9 -19*x^10 -18*x^11 -16*x^12 -13*x^13 +14*x^14 +10*x^15 +7*x^16 +5*x^17 +4*x^18 +3*x^19 +2*x^20) / ((1 -x)*(1 +x +x^2 +x^3 +x^4 +x^5 +x^6)*(1 -22*x^7 +x^14)). - Colin Barker, Jul 19 2016
a(n) = 23*a(n-7) - 23*a(n-14) + a(n-21).

A276271 a(0) = a(1) = a(2) = a(3) = 1; for n > 3, a(n) = (a(n-1)^2+a(n-2)^2+a(n-3)^2+a(n-1)+a(n-2)+a(n-3))/a(n-4).

Original entry on oeis.org

1, 1, 1, 1, 6, 46, 2206, 4870846, 3954191749561, 339905052007042640998641, 52373274877565894156748130733610185904753361, 563138297002425210235477817802336090254190075906443582099838858026136728896536841
Offset: 0

Views

Author

Seiichi Manyama, Aug 26 2016

Keywords

Crossrefs

Programs

  • Mathematica
    nxt[{a_,b_,c_,d_}]:={b,c,d,(b^2+c^2+d^2+b+c+d)/a}; NestList[nxt,{1,1,1,1},12][[All,1]] (* Harvey P. Dale, Mar 10 2017 *)
  • Ruby
    def A(m, n)
      a = Array.new(m, 1)
      ary = [1]
      while ary.size < n + 1
        i = a[1..-1].inject(0){|s, i| s + i * i} + a[1..-1].inject(:+)
        break if i % a[0] > 0
        a = *a[1..-1], i / a[0]
        ary << a[0]
      end
      ary
    end
    def A276271(n)
      A(4, n)
    end

Formula

a(n) = 8*a(n-1)*a(n-2)*a(n-3)-a(n-4)-1.
a(n) ~ 2^(-3/2) * c^(d^n), where c = 1.2578918597... and d = A058265 = 1.83928675521416... = (1 + (19 + 3*sqrt(33))^(1/3) + (19 - 3*sqrt(33))^(1/3))/3. - Vaclav Kotesovec, Mar 20 2017

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

Original entry on oeis.org

1, 1, 2, 6, 42, 903, 136052, 881442036, 2581196224947732, 342795531574625708871288171, 5732512385084161208637718426682572229606557631, 5754497648510061274107897581706624823818534711463525598519384262130236399970112
Offset: 0

Views

Author

Seiichi Manyama, Sep 03 2016

Keywords

Comments

From Antoine de Saint Germain, Dec 30 2024: (Start)
Sequence consists of integers, see Math StackExchange link.
Values of a unitary Y-frieze pattern associated to the linearly oriented quiver K4 (i.e., the quiver whose underlying graph is the complete graph on the vertices {1,2,3,4}, oriented such that i -> j whenever i < j). (End)

Crossrefs

Programs

  • Magma
    I:=[1, 1, 2, 6]; [n le 4 select I[n] else (Self(n-1)+1)*(Self(n-2)+1)*(Self(n-3)+1)/Self(n-4): n in [1..13]]; // Vincenzo Librandi, Dec 30 2024
  • Mathematica
    RecurrenceTable[{a[n] == (a[n - 1] + 1) (a[n - 2] + 1) (a[n - 3] + 1)/a[n - 4], a[0] == 1, a[1] == 1, a[2] == 2, a[3] == 6}, a, {n, 0, 11}] (* Michael De Vlieger, Sep 03 2016 *)
  • Ruby
    def A276453(n)
      a = [1, 1, 2, 6]
      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
    

Formula

a(n) = A051786(n)*A051786(n+1)*A051786(n+2).

A112449 a(n+2) = (a(n+1)^3 + a(n+1))/a(n) with a(0)=1, a(1)=1.

Original entry on oeis.org

1, 1, 2, 10, 505, 12878813, 4229958765311886322, 5876687051603582015287706866081267480733704277890
Offset: 0

Views

Author

Andrew Hone, Dec 12 2005

Keywords

Comments

A second-order recurrence with the Laurent property. This property is satisfied by any second-order recurrence of the form a(n+2) = f(a(n+1))/a(n) with f being a polynomial of the form f(x) = x*p(x) where p is a polynomial of degree d with integer coefficients such that p(0)=1 and p has the reciprocal property x^d*p(1/x) = p(x). Hence if a(0) = a(1) = 1 then a(n) is an integer for all n.
As n tends to infinity, log(log(a(n)))/n tends to log((3+sqrt(5))/2) or about 0.962 (A202543).

Crossrefs

Programs

  • Maple
    a[0]:=1; a[1]:=1; f(x):=x^3+x;
    for n from 0 to 8 do a[n+2]:=simplify(subs(x=a[n+1],f(x))/a[n]) od;
    s[3]:=ln(10); s[4]:=ln(505);
    for n from 3 to 10000 do s[n+2]:=evalf(3*s[n+1]+ln(1+exp(-2*s[n+1]))-s[n]): od: print(evalf(ln(s[10002])/(10002))): evalf(ln((3+sqrt(5))/2));
    # s[n]=ln(a[n]); ln(s[n])/n converges slowly to 0.962...
    f:=proc(n) option remember; local i,j,k,t1,t2,t3; if n <= 1 then RETURN(1); fi; (f(n-1)^3+f(n-1))/f(n-2); end;
    # N. J. A. Sloane
  • Mathematica
    nxt[{a_,b_}]:={b,(b^3+b)/a}; NestList[nxt,{1,1},10][[All,1]] (* Harvey P. Dale, Jun 26 2017 *)
  • Ruby
    def A(l, m, n)
      a = Array.new(2 * m, 1)
      ary = [1]
      while ary.size < n + 1
        i = a[1..-1].inject(:*) + a[m] ** l
        break if i % a[0] > 0
        a = *a[1..-1], i / a[0]
        ary << a[0]
      end
      ary
    end
    def A112449(n)
      A(3, 1, n)
    end # Seiichi Manyama, Nov 20 2016

Formula

a(1-n) = a(n). - Seiichi Manyama, Nov 20 2016

A387123 Numbers k such that Sum_{i=1..r} (k-i) and Sum_{i=1..r} (k+i) are both triangular for some r with 1 <= r < k.

Original entry on oeis.org

2, 6, 9, 21, 24, 38, 50, 53, 65, 77, 90, 96, 104, 133, 147, 195, 201, 224, 247, 286, 324, 377, 450, 483, 553, 588, 605, 614, 713, 792, 901, 1014, 1029, 1043, 1066, 1074, 1155, 1274, 1349, 1575, 1784, 1885, 1920, 2034, 2057, 2109, 2279, 2312, 2342, 2622
Offset: 1

Views

Author

Ctibor O. Zizka, Aug 17 2025

Keywords

Comments

For m >= 1, if k = m*(m+1)^2/2 then r = m, thus A006002 is a subsequence. For k >= 286 from A101265 or A101879, r = k-1.

Examples

			For k = 6: the least r = 5, T_i = 1 + 2 + 3 + 4 + 5 = 15, T_j = 7 + 8 + 9 + 10 + 11 = 45, both T_i and T_j are triangular numbers, thus k = 6 is a term.
		

Crossrefs

Programs

  • Mathematica
    triQ[n_] := IntegerQ[Sqrt[8*n + 1]]; q[k_] := Module[{r = 1, s1 = 0, s2 = 0}, While[s1 += k - r; s2 += k + r; r < k && (! triQ[s1] || ! triQ[s2]), r++]; 1 <= r < k]; Select[Range[3000], q] (* Amiram Eldar, Aug 17 2025 *)
  • PARI
    isok(k) = my(sm=0, sp=0); for (r=1, k-1, sm+=k-r; sp+=k+r; if (ispolygonal(sm, 3) && ispolygonal(sp, 3), return(r));); \\ Michel Marcus, Aug 17 2025
    
  • Python
    from itertools import count, islice
    from sympy.ntheory.primetest import is_square
    def A387123_gen(startvalue=1): # generator of terms >= startvalue
        for k in count(max(startvalue,1)):
            if any(is_square(((k*r<<1)-r*(r+1)<<2)+1) and is_square(((k*r<<1)+r*(r+1)<<2)+1) for r in range(1,k)):
                yield k
    A387123_list = list(islice(A387123_gen(),50)) # Chai Wah Wu, Aug 21 2025
Showing 1-10 of 10 results.