login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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

%I #24 Jan 19 2019 04:15:43

%S 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,

%T 13,10,12,14,11,13,15,12,14,16,13,15,17,14,16,18,15,17,19,16,18,20,17,

%U 19,21,18,20,22,19,21,23,20,22,24,21,23,25,22,24,26,23,25,27,24,26,28,25

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

%H G. C. Greubel, <a href="/A171088/b171088.txt">Table of n, a(n) for n = 0..1000</a>

%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (1,0,1,-1).

%F a(3n) = n-1; a(3n+1) = n+1; a(3n+2) = n+3. Or, a(n) = 1 + a(n-3). - _Alex Meiburg_, Aug 21 2010

%F a(n) = a(n-1) + a(n-3) - a(n-4) = (n + 3 + 5*A049347(n-1))/3. - _R. J. Mathar_, Aug 21 2010

%F G.f.: (1+2*x+x^3-3*x^2)/((1+x+x^2)*(x-1)^2). - _R. J. Mathar_, Aug 21 2010

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

%F a(n) = (3*n+9+10*sqrt(3)*sin(2*n*Pi/3))/9. - _Wesley Ivan Hurt_, Oct 01 2017

%e 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)].

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

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

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

%K nonn,easy

%O 0,2

%A _N. J. A. Sloane_, Sep 08 2010, based on a posting to the Sequence Fans Mailing List by _Eric Angelini_, Aug 21 2010

%E a(28) onwards from _Robert G. Wilson v_, Sep 10 2010