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

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A166517 (3 +5*(-1)^n+6*n)/4. 1
2, 1, 5, 4, 8, 7, 11, 10, 14, 13, 17, 16, 20, 19, 23, 22, 26, 25, 29, 28, 32, 31, 35, 34, 38, 37, 41, 40, 44, 43, 47, 46, 50, 49, 53, 52, 56, 55, 59, 58, 62, 61, 65, 64, 68, 67, 71, 70, 74, 73, 77, 76, 80, 79, 83, 82, 86, 85, 89, 88, 92, 91, 95, 94, 98, 97, 101, 100, 104, 103, 107 (list; graph; refs; listen; history; internal format)
OFFSET

0,1

COMMENTS

A sequence defined by a(1)=1, a(n)=k*n-a(n-1), k a constant parameter, has recurrence a(n)= 3*a(n-1) -3*a(n-2) +a(n-3). Its generating function is x*(1+2*(k-1)*x+(1-k)*x^2)/((1+x)*(1-x)^2).

The closed form is a(n) = k*n/2+k/4+(-1)^n*(3*k/4-1). This applies with k=3 to this sequence here, and for example to sequences A165033, and A166519-A166525. [From R. J. Mathar (mathar(AT)strw.leidenuniv.nl), Oct 17 2009]

Also: A001651, terms swapped by pairs [Paul Curtz (bpcrtz(AT)free.fr), Feb 20 2010]

a(n) mod 9 defines a period-6 sequence which is a permutation of A141425. [Paul Curtz (bpcrtz(AT)free.fr), Feb 20 2010]

LINKS

Index to sequences with linear recurrences with constant coefficients, signature (1,1,-1).

FORMULA

a(n)=3*n-a(n-1).

a(n+1)-a(n) = (-1)^(n+1)*A010685(n). [Paul Curtz (bpcrtz(AT)free.fr), Feb 20 2010]

Second differences: |a(n+2)-2*a(n+1)+a(n)| = A010716(n). [Paul Curtz (bpcrtz(AT)free.fr), Feb 20 2010]

a(2*n)+a(2*n+1) = A016945(n) = 6*n+3. [Paul Curtz (bpcrtz(AT)free.fr), Feb 20 2010]

a(2*n) = A016945(n). a(2*n+1) = A016777(n). [Paul Curtz (bpcrtz(AT)free.fr), Feb 20 2010]

G.f. ( 2-x+2*x^2 ) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Mar 08 2011

MATHEMATICA

CoefficientList[Series[(2x^2-x+2)/((1+x)(x-1)^2), {x, 0, 80}], x]  (* From Harvey P. Dale, Mar 25 2011 *)

CROSSREFS

Sequence in context: A010582 A171175 A176053 * A019473 A056605 A091802

Adjacent sequences:  A166514 A166515 A166516 * A166518 A166519 A166520

KEYWORD

nonn,easy

AUTHOR

Vincenzo Librandi (vincenzo.librandi(AT)tin.it), Oct 16 2009

EXTENSIONS

a(0)=2 added by Paul Curtz (bpcrtz(AT)free.fr), Feb 20 2010

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified February 15 16:28 EST 2012. Contains 205823 sequences.