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.

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

Original entry on oeis.org

13, 17, 23, 30, 40, 54, 72, 96, 128, 170, 227, 303, 404, 538, 718, 957, 1276, 1701, 2268, 3024, 4032, 5376, 7168, 9558, 12744, 16992, 22656, 30208, 40277, 53703, 71604, 95472, 127296, 169728, 226304, 301738, 402318, 536424, 715232, 953642
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) >;
    A120157:= func< n | g(n, 13, 0) >;
    [A120157(n): n in [1..60]]; // G. C. Greubel, Aug 31 2023
    
  • Mathematica
    Module[{lst={13}},Do[AppendTo[lst,13+Floor[Total[lst]/3]],{40}];lst] (* Harvey P. Dale, May 22 2012 *)
  • SageMath
    @CachedFunction
    def A120157(n): return 13 +(sum(A120157(k) for k in range(1, n)))//3
    [A120157(n) for n in range(1, 61)] # G. C. Greubel, Aug 31 2023

Extensions

Name edited by G. C. Greubel, Aug 31 2023