login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

%I #8 Sep 01 2023 04:15:08

%S 13,17,23,30,40,54,72,96,128,170,227,303,404,538,718,957,1276,1701,

%T 2268,3024,4032,5376,7168,9558,12744,16992,22656,30208,40277,53703,

%U 71604,95472,127296,169728,226304,301738,402318,536424,715232,953642

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

%H Harvey P. Dale, <a href="/A120157/b120157.txt">Table of n, a(n) for n = 1..1000</a>

%t Module[{lst={13}},Do[AppendTo[lst,13+Floor[Total[lst]/3]],{40}];lst] (* _Harvey P. Dale_, May 22 2012 *)

%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 A120157:= func< n | g(n, 13, 0) >;

%o [A120157(n): n in [1..60]]; // _G. C. Greubel_, Aug 31 2023

%o (SageMath)

%o @CachedFunction

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

%o [A120157(n) for n in range(1, 61)] # _G. C. Greubel_, Aug 31 2023

%Y Cf. A072493, A073941, A112088.

%K nonn

%O 1,1

%A _Graeme McRae_, Jun 10 2006

%E Name edited by _G. C. Greubel_, Aug 31 2023