login
Define the Shallit sequence S(a_0,a_1) by a_{n+2} is the least integer > a_{n+1}^2/a_n for n >= 0. This is S(2,6).
2

%I #25 Jul 13 2023 09:25:14

%S 2,6,19,61,196,630,2026,6516,20957,67403,216786,697242,2242518,

%T 7212542,23197479,74609345,239963764,771788146,2482278709,7983677414,

%U 25677658524,82586271099,265619708576,854304579262,2747673800490,8837259564290,28423008798464

%N Define the Shallit sequence S(a_0,a_1) by a_{n+2} is the least integer > a_{n+1}^2/a_n for n >= 0. This is S(2,6).

%H Alois P. Heinz, <a href="/A018906/b018906.txt">Table of n, a(n) for n = 0..1000</a>

%H D. W. Boyd, <a href="http://matwbn.icm.edu.pl/ksiazki/aa/aa34/aa3444.pdf">Some integer sequences related to the Pisot sequences</a>, Acta Arithmetica, 34 (1979), 295-305.

%H D. W. Boyd, <a href="https://www.researchgate.net/profile/David_Boyd7/publication/262181133_Linear_recurrence_relations_for_some_generalized_Pisot_sequences_-_annotated_with_corrections_and_additions/links/00b7d536d49781037f000000.pdf">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 Jeffrey Shallit, <a href="http://www.fq.math.ca/Scanned/29-1/elementary29-1.pdf">Problem B-686</a>, Fib. Quart., 29 (1991), 85.

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

%F a(n) = [ a(n-1)^2/a(n-2)+1 ].

%p a:= proc(n) option remember; `if`(n<2, [2, 6][n+1],

%p 1 +floor(a(n-1)^2/a(n-2)))

%p end:

%p seq(a(n), n=0..40); # _Alois P. Heinz_, May 05 2014

%t a[0]=2; a[1]=6; a[n_] := a[n] = Floor[a[n-1]^2/a[n-2]+1]; Table[a[n], {n, 0, 40}] (* _Jean-François Alcover_, Mar 30 2015 *)

%o (PARI) a1n=concat([ 2,6 ],vector(28)); a(n)=a1n[ n+1 ]; for(n=2,29,a1n[ n+1 ]=1+floor(a(n-1)^2/a(n-2)))

%Y There has been some confusion between A018906 and A014010. I think the descriptions are correct now, thanks to _Michael Somos_.

%K nonn

%O 0,1

%A _Simon Plouffe_, _R. K. Guy_

%E An incorrect g.f. was deleted by _N. J. A. Sloane_, Sep 16 2009