cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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

Original entry on oeis.org

14, 19, 25, 33, 44, 59, 79, 105, 140, 187, 249, 332, 443, 590, 787, 1049, 1399, 1865, 2487, 3316, 4421, 5895, 7860, 10480, 13973, 18631, 24841, 33122, 44162, 58883, 78511, 104681, 139575, 186100, 248133, 330844, 441125, 588167, 784223, 1045630
Offset: 1

Views

Author

Graeme McRae, Jun 10 2006

Keywords

Crossrefs

Programs

  • Magma
    function f(n, a, b)
      t:=0;
        for k in [1..n-1] do
          t+:= a+Floor((b+t)/3);
        end for;
      return t;
    end function;
    g:= func< n, a, b | f(n+1, a, b)-f(n, a, b) >;
    A120158:= func< n | g(n, 14, 1) >;
    [A120158(n): n in [1..60]]; // G. C. Greubel, Aug 31 2023
    
  • Mathematica
    nxt[{a_,t_}]:=Module[{c=Floor[(43+t)/3]},{c,t+c}]; Rest[Transpose[ NestList[ nxt,{14,0},40]][[1]]] (* Harvey P. Dale, Jun 12 2014 *)
    A120158[n_]:= A120158[n]= 14 +Quotient[1 +Sum[A120158[k], {k,n-1}], 3];
    Table[A120158[n], {n, 60}] (* G. C. Greubel, Aug 31 2023 *)
  • SageMath
    @CachedFunction
    def A120158(n): return 14 +(1+sum(A120158(k) for k in range(1, n)))//3
    [A120158(n) for n in range(1, 61)] # G. C. Greubel, Aug 31 2023