login
a(n) = 6 + floor((1 + Sum_{j=1..n-1} a(j))/3).
1

%I #12 Jul 07 2023 05:45:12

%S 6,8,11,14,19,25,34,45,60,80,107,142,190,253,337,450,600,800,1066,

%T 1422,1896,2528,3370,4494,5992,7989,10652,14203,18937,25249,33666,

%U 44888,59850,79800,106400,141867,189156,252208,336277,448370

%N a(n) = 6 + floor((1 + Sum_{j=1..n-1} a(j))/3).

%H G. C. Greubel, <a href="/A120152/b120152.txt">Table of n, a(n) for n = 1..1000</a>

%t Module[{lista={6}},Do[AppendTo[lista,Floor[(19+Total[lista])/3]],{40}];lista] (* _Harvey P. Dale_, Jun 11 2013 *)

%t nxt[{s_,a_}]:=Module[{x=Floor[(19+s)/3]},{s+x,x}]; NestList[nxt,{6,6},40][[;;,2]] (* _Harvey P. Dale_, Mar 26 2023 *)

%o (Magma)

%o function f(n,a,b)

%o t:=0;

%o for k in [1..n-1] do

%o t+:= a+Floor((b+t)/3);

%o end for;

%o return t;

%o end function;

%o g:= func< n,a,b | f(n+1,a,b)-f(n,a,b) >;

%o A120152:= func< n | g(n,6,1) >;

%o [A120152(n): n in [1..60]]; // _G. C. Greubel_, Jun 15 2023

%o (SageMath)

%o @CachedFunction

%o def A120152(n): return 6 + (1 + sum(A120152(k) for k in range(1,n)))//3

%o [A120152(n) for n in range(1, 61)] # _G. C. Greubel_, Jun 15 2023

%Y Cf. A072493, A073941, A112088.

%K nonn

%O 1,1

%A _Graeme McRae_, Jun 10 2006