|
|
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
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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
|
|
|
MAPLE
|
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;
|
|
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
}
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|