login
Define the sequence S(a(0),a(1)) by a(n+2) is the least integer such that a(n+2)/a(n+1) > a(n+1)/a(n) for n >= 0. This is S(1,5).
3

%I #85 Aug 06 2024 04:41:03

%S 1,5,26,136,712,3728,19520,102208,535168,2802176,14672384,76825600,

%T 402264064,2106281984,11028635648,57746685952,302365573120,

%U 1583206694912,8289777876992,43405840482304,227275931385856,1190032226385920,6231089632772096,32626408891088896

%N Define the sequence S(a(0),a(1)) by a(n+2) is the least integer such that a(n+2)/a(n+1) > a(n+1)/a(n) for n >= 0. This is S(1,5).

%C a(n) is the number of compositions of n when there are 5 types of ones. - _Milan Janjic_, Aug 13 2010

%C a(n)/a(n-1) tends to (6 + sqrt(20))/2 = 5.236067.... - _Gary W. Adamson_, Jul 30 2013

%C Number of words of length n over {0,1,...,6} in which each 1 is followed by at least one zero. - _Milan Janjic_, Jan 24 2017

%H Colin Barker, <a href="/A018903/b018903.txt">Table of n, a(n) for n = 0..1000</a>

%H D. W. Boyd, <a href="http://www.researchgate.net/publication/258834801">Linear recurrence relations for some generalized Pisot sequences</a>, Advances in Number Theory (Kingston ON, 1991) 333-340, Oxford Sci. Publ., Oxford Univ. Press, New York, 1993.

%H Pamela Fleischmann, Jonas Höfer, Annika Huch, and Dirk Nowotka, <a href="https://arxiv.org/abs/2306.14192">alpha-beta-Factorization and the Binary Case of Simon's Congruence</a>, arXiv:2306.14192 [math.CO], 2023.

%H H. D. Nguyen and D. Taggart, <a href="https://citeseerx.ist.psu.edu/pdf/8f2f36f22878c984775ed04368b8893879b99458">Mining the OEIS: Ten Experimental Conjectures</a>, 2013. Mentions this sequence. - From _N. J. A. Sloane_, Mar 16 2014

%H INRIA Algorithms Project, <a href="http://ecs.inria.fr/services/structure?nbr=879">Encyclopedia of Combinatorial Structures 879</a>

%H <a href="/index/Rec#order_02">Index entries for linear recurrences with constant coefficients</a>, signature (6,-4).

%H <a href="/index/Ph#Pisot">Index entries for Pisot sequences</a>

%F a(n) = (a(1)+1)*a(n-1) - (a(1)-1)*a(n-2) = 6*a(n-1) - 4*a(n-2).

%F G.f.: (1 - x)/(1 - 6*x + 4*x^2). - _Colin Barker_, Feb 04 2012

%F a(n) = 2^(n-1)*A000045(2*n+3). - _Sergio Falcon_, Jan 25 2017

%F a(n) = ((3-sqrt(5))^n*(-2+sqrt(5)) + (2+sqrt(5))*(3+sqrt(5))^n) / (2*sqrt(5)). - _Colin Barker_, Jan 20 2017

%F Equivalent to the first formula: a(n)=a(1)+a(2)+....+a(n-2)+5*a(n-1). - _Arie Bos_, May 05 2017

%F a(n) = Sum_{k>=1} binomial(k+n-1,n) * A000045(k) / 2^(k+1). - _Diego Rattaggi_, Jun 25 2020

%t LinearRecurrence[{6, -4}, {1, 5}, 24] (* or *)

%t CoefficientList[Series[(1 - x)/(1 - 6 x + 4 x^2), {x, 0, 23}], x] (* or *)

%t a = {1, 5}; Do[AppendTo[a, 6 a[[n - 1]] - 4 a[[n - 2]]], {n, 3, 24}];

%t a (* or *)

%t S[a_, b_, n_] := Block[{s = {a, b}, k}, Do[k = Last@ s + 1; While[k/s[[i - 1]] <= s[[i - 1]]/s[[i - 2]], k++]; AppendTo[s, k], {i, 3, n}]; s]; S[1, 5, 10] (* _Michael De Vlieger_, Feb 15 2016 *)

%o (PARI) S(a0, a1, maxn) = a=vector(maxn); a[1]=a0; a[2]=a1; for(n=3, maxn, a[n]=a[n-1]^2\a[n-2]+1); a

%o S(1, 5, 40) \\ _Colin Barker_, Feb 15 2016

%o (PARI) Vec((1-x)/(1-6*x+4*x^2) + O(x^40)) \\ _Colin Barker_, Feb 15 2016

%K nonn,easy

%O 0,2

%A _R. K. Guy_