

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



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


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



KEYWORD

nonn,easy


AUTHOR



EXTENSIONS



STATUS

approved



