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.

A147534 a(n) is congruent to (1,1,2) mod 3.

Original entry on oeis.org

1, 1, 2, 4, 4, 5, 7, 7, 8, 10, 10, 11, 13, 13, 14, 16, 16, 17, 19, 19, 20, 22, 22, 23, 25, 25, 26, 28, 28, 29, 31, 31, 32, 34, 34, 35, 37, 37, 38, 40, 40, 41, 43, 43, 44, 46, 46, 47, 49, 49, 50, 52, 52, 53, 55, 55, 56, 58, 58, 59, 61, 61, 62, 64, 64, 65, 67, 67, 68, 70, 70, 71
Offset: 1

Views

Author

Giovanni Teofilatto, Nov 06 2008

Keywords

Crossrefs

Cf. A004396 for a(n) congruent to (0, 1, 1) mod 2.
Cf. A131713.

Programs

  • Magma
    I:=[1,1,2]; [n le 3 select I[n] else Self(n-3)+3: n in [1..70]]; // Vincenzo Librandi, Jul 25 2016
  • Maple
    a:=n->add(chrem( [n,j], [1,3] ), j=1..n): seq(a(n)+1, n=-1..70); # Zerinvary Lajos, Apr 08 2009
  • Mathematica
    LinearRecurrence[{1,0,1,-1},{1,1,2,4},80] (* Harvey P. Dale, Dec 09 2012 *)

Formula

a(n) = a(n-3)+3 = n-2/3-A131713(n)/3. G.f.: x*(1+x^2+x^3)/((1-x)^2*(1+x+x^2)). [R. J. Mathar, Nov 07 2008]
a(1)=1, a(2)=1, a(3)=2, a(4)=4, a(n)=a(n-1)+a(n-3)-a(n-4) for n>4. - Harvey P. Dale, Dec 09 2012
a(n) = (3*n - 2 - cos(2*n*Pi/3) + sqrt(3)*sin(2*n*Pi/3))/3. - Wesley Ivan Hurt, Jul 24 2016
a(n) = 1 + floor((n-1)/3) + floor(2*(n-1)/3). - Wesley Ivan Hurt, Jul 25 2016
a(n) = n - sign((n-1) mod 3). - Wesley Ivan Hurt, Sep 25 2017