OFFSET
1,4
COMMENTS
First 14 terms are the same as A179241.
Ratio of consecutive terms approaches the real root of x^3 - (x^2 + x + 1)/2 = 0, whose approximate value is 1.2337519285, and whose exact value is (1 + (64 - 3*sqrt(417))^(1/3) + (64 + 3*sqrt(417))^(1/3))/6.
Same as A180235 for n > 5. - Georg Fischer, Oct 09 2018
LINKS
Vincenzo Librandi, Table of n, a(n) for n = 1..2000
MAPLE
a(4) = ceiling((1+1+1)/2) = 2;
a(5) = ceiling((1+1+2)/2) = 2;
a(6) = ceiling((1+2+2)/2) = 3.
MATHEMATICA
RecurrenceTable[{a[n] == Ceiling[(a[n - 1] + a[n - 2] + a[n - 3])/2], a[1] == a[2] == a[3] == 1}, a, {n, 1, 49}] (* Michael De Vlieger, Jun 20 2015 *)
nxt[{a_, b_, c_}]:={b, c, Ceiling[(a+b+c)/2]}; NestList[nxt, {1, 1, 1}, 50][[All, 1]] (* Harvey P. Dale, Feb 03 2022 *)
PROG
(PARI) lista(nn) = {va = vector(nn, n, if (n<=3, 1)); for (n=4, nn, va[n] = ceil((va[n-1]+va[n-2]+va[n-3])/2); ); va; } \\ Michel Marcus, Jun 17 2015
(Magma) [n le 3 select 1 else Ceiling((Self(n-1)+Self(n-2)+ Self(n-3))/2): n in [1..60]]; // Vincenzo Librandi, Oct 10 2018
CROSSREFS
KEYWORD
nonn
AUTHOR
Morris Neene, Jun 13 2015
STATUS
approved