login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A010921
Shallit sequence S(3,13), a(n)=[ a(n-1)^2/a(n-2)+1 ].
2
3, 13, 57, 250, 1097, 4814, 21126, 92711, 406861, 1785505, 7835669, 34386747, 150905861, 662248712, 2906271193, 12754139184, 55971399613, 245629871954, 1077943993063, 4730545364606, 20759946333583, 91104796287932, 399812397069577, 1754572309731352
OFFSET
0,1
COMMENTS
Matches the sequence A275634 with g.f. ( 3-2*x-2*x^2 ) / ( 1-5*x+2*x^2+3*x^3 ) for n<=9, but is then different. - R. J. Mathar, Feb 11 2016
LINKS
D. W. Boyd, Some integer sequences related to the Pisot sequences, Acta Arithmetica, 34 (1979), 295-305.
D. W. Boyd, Linear recurrence relations for some generalized Pisot sequences, Advances in Number Theory ( Kingston ON, 1991) 333-340, Oxford Sci. Publ., Oxford Univ. Press, New York, 1993.
Jeffrey Shallit, Problem B-686, Fib. Quart., 29 (1991), 85.
MAPLE
A010921 := proc(n)
option remember;
if n <= 1 then
op(n+1, [3, 13]) ;
else
a := procname(n-1)^2/procname(n-2) ;
floor(1+a) ;
end if;
end proc: # R. J. Mathar, Feb 11 2016
MATHEMATICA
RecurrenceTable[{a[0]==3, a[1]==13, a[n]==Floor[a[n-1]^2/a[n-2]+1]}, a[n], {n, 25}] (* Harvey P. Dale, Oct 24 2011 *)
PROG
(PARI) A010921(n, a=[3, 13])={for(n=2, if(type(n)=="t_VEC", n[1], n), a=concat(a, a[n]^2\a[n-1]+1)); if(type(n)=="t_VEC", a, a[n+1])} \\ Use A010921([n]) to get the vector [a(0), ..., a(n)] \\ M. F. Hasler, Feb 11 2016
(PARI) pisotS(nmax, a1, a2) = {
a=vector(nmax); a[1]=a1; a[2]=a2;
for(n=3, nmax, a[n] = floor(a[n-1]^2/a[n-2]+1));
a
}
pisotS(50, 3, 13) \\ Colin Barker, Aug 09 2016
CROSSREFS
Sequence in context: A151221 A020515 A049086 * A275634 A163606 A115968
KEYWORD
nonn
AUTHOR
STATUS
approved