

A171088


To find 3 consecutive integers in the sequence, you have to take 4 consecutive terms, no more and no less.


1



1, 3, 0, 2, 4, 1, 3, 5, 2, 4, 6, 3, 5, 7, 4, 6, 8, 5, 7, 9, 6, 8, 10, 7, 9, 11, 8, 10, 12, 9, 11, 13, 10, 12, 14, 11, 13, 15, 12, 14, 16, 13, 15, 17, 14, 16, 18, 15, 17, 19, 16, 18, 20, 17, 19, 21, 18, 20, 22, 19, 21, 23, 20, 22, 24, 21, 23, 25, 22, 24, 26, 23, 25, 27, 24, 26, 28, 25
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


LINKS

G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,0,1,1).


FORMULA

a(3n) = n1; a(3n+1) = n+1; a(3n+2) = n+3. Or, a(n) = 1 + a(n3).  Alex Meiburg, Aug 21 2010
a(n) = a(n1) + a(n3)  a(n4) = (n + 3 + 5*A049347(n1))/3.  R. J. Mathar, Aug 21 2010
G.f.: (1+2*x+x^33*x^2)/((1+x+x^2)*(x1)^2).  R. J. Mathar, Aug 21 2010
a(n) = 1 + n/3  (5*I/9)*sqrt(3)*(1/2+(I/2)*sqrt(3))^n + (5*I/9)*sqrt(3)*(1/2(I/2)*sqrt(3))^n for each n >= 0.  Alexander R. Povolotsky, Aug 21 2010
a(n) = (3*n+9+10*sqrt(3)*sin(2*n*Pi/3))/9.  Wesley Ivan Hurt, Oct 01 2017


EXAMPLE

Taking the first 3 terms doesn't give 3 consecutive integers as they are 0, 1 and ... 3. But if you take the fourth term (2), you'll have in hand 0,1,2 [and even another triple of consecutive integers, which is (1,2,3)].


MATHEMATICA

f[n_] := Switch[ Mod[n, 3], 0, n/3 + 1, 1, (n + 8)/3, 2, (n  2)/3]; Array[f, 78, 0] (* Robert G. Wilson v, Sep 10 2010 *)
CoefficientList[Series[(1 + 2*x + x^3  3*x^2)/((1 + x + x^2)*(x  1)^2), {x, 0, 50}], x] (* G. C. Greubel, Feb 25 2017 *)


PROG

(PARI) x='x+O('x^50); Vec((1+2*x+x^33*x^2)/((1+x+x^2)*(x1)^2)) \\ _G. C. Greubel, Feb 25 2017


CROSSREFS

Sequence in context: A136163 A178313 A190013 * A058624 A145856 A092154
Adjacent sequences: A171085 A171086 A171087 * A171089 A171090 A171091


KEYWORD

nonn,easy


AUTHOR

N. J. A. Sloane, Sep 08 2010, based on a posting to the Sequence Fans Mailing List by Eric Angelini, Aug 21 2010


EXTENSIONS

a(28) onwards from Robert G. Wilson v, Sep 10 2010


STATUS

approved



