login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A186731 a(3n) = 2n, a(3n+1) = n, a(3n+2) = n+1. 4
0, 0, 1, 2, 1, 2, 4, 2, 3, 6, 3, 4, 8, 4, 5, 10, 5, 6, 12, 6, 7, 14, 7, 8, 16, 8, 9, 18, 9, 10, 20, 10, 11, 22, 11, 12, 24, 12, 13, 26, 13, 14, 28, 14, 15, 30, 15, 16, 32, 16, 17, 34, 17, 18, 36, 18, 19, 38, 19, 20, 40, 20, 21, 42, 21, 22, 44, 22, 23, 46, 23, 24, 48 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,4

COMMENTS

Column k = 2 of triangle in A198295.

LINKS

Robert Israel, Table of n, a(n) for n = 0..10000

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

FORMULA

G.f.: (x*(1+x)/(1-x^3))^2.

a(n) = |A099254(n-2)| = |A099470(n-1)|. - R. J. Mathar, May 02 2013

From Wesley Ivan Hurt, Apr 28 2015: (Start)

a(n) = 2*a(n-3)-a(n-6).

a(n) = (n+1+n*0^mod(n,3)-mod(n+1,3))/3. (End)

E.g.f.: (4/9)*x*exp(x) - (x/9)*exp(-x/2)*cos(sqrt(3)*x/2) - (sqrt(3)/9)*(2+x)*exp(-x/2)*sin(sqrt(3)*x/2). - Robert Israel, Apr 01 2016

MAPLE

f:= gfun:-rectoproc({a(n)=2*a(n-3)-a(n-6), seq(a(i) = [0, 0, 1, 2, 1, 2][i+1], i=0..5)}, a(n), remember):

map(f, [$0..100]); # Robert Israel, Apr 01 2016

MATHEMATICA

CoefficientList[Series[(x*(1 + x)/(1 - x^3))^2, {x, 0, 100}], x] (* Wesley Ivan Hurt, Apr 28 2015 *)

LinearRecurrence[{0, 0, 2, 0, 0, -1}, {0, 0, 1, 2, 1, 2}, 100] (* Vincenzo Librandi, Apr 28 2015 *)

PROG

(MAGMA) I:=[0, 0, 1, 2, 1, 2]; [n le 6 select I[n] else 2*Self(n-3)-Self(n-6): n in [1..80]]; // Vincenzo Librandi, Apr 28 2015

(PARI) vector(50, n, n--; (n+1+n*0^(n%3)-(n+1)%3)/3) \\ Derek Orr, Apr 28 2015

CROSSREFS

Cf. A000027, A001477, A005843, A011655, A185395, A185292.

Sequence in context: A068309 A099470 A099254 * A180108 A300417 A121339

Adjacent sequences:  A186728 A186729 A186730 * A186732 A186733 A186734

KEYWORD

easy,nonn

AUTHOR

Philippe Deléham, Jan 21 2012

EXTENSIONS

More terms from Vincenzo Librandi, Apr 28 2015

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 January 17 12:42 EST 2020. Contains 330958 sequences. (Running on oeis4.)