login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A147534 a(n) is congruent to (1,1,2) mod 3. 1
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 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Table of n, a(n) for n=1..72.

Index entries for linear recurrences with constant coefficients, signature (1,0,1,-1).

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

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 *)

PROG

(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

CROSSREFS

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

Cf. A131713.

Sequence in context: A085898 A058679 A058568 * A118001 A182414 A256984

Adjacent sequences:  A147531 A147532 A147533 * A147535 A147536 A147537

KEYWORD

easy,nonn

AUTHOR

Giovanni Teofilatto, Nov 06 2008

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 17 17:27 EDT 2019. Contains 327136 sequences. (Running on oeis4.)