|
|
A258875
|
|
a(1) = a(2) = a(3) = 1; for n > 3, a(n) = ceiling((a(n-1) + a(n-2) + a(n-3))/2).
|
|
2
|
|
|
1, 1, 1, 2, 2, 3, 4, 5, 6, 8, 10, 12, 15, 19, 23, 29, 36, 44, 55, 68, 84, 104, 128, 158, 195, 241, 297, 367, 453, 559, 690, 851, 1050, 1296, 1599, 1973, 2434, 3003, 3705, 4571, 5640, 6958, 8585, 10592, 13068, 16123, 19892, 24542, 30279
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
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.
|
|
LINKS
|
|
|
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
|
|
|
STATUS
|
approved
|
|
|
|