# [seqfan] Re: Simple seq with 3 in 4

Alexander P-sky apovolot at gmail.com
Sat Aug 21 19:56:40 CEST 2010

```PURRS Demo Results
Verified exact solution for x(n) = x(-1+n)-x(-4+n)+x(-3+n)
for the initial conditions
x(0) = 1
x(1) = 3
x(2) = 0
x(3) = 2
Verified solution
x(n) = 1+1/3*n-(5/9*I)*sqrt(3)*(-1/2+(1/2*I)*sqrt(3))^n+(5/9*I)*sqrt(3)*(-1/2-(1/2*I)*sqrt(3))^n
for each n >= 0

Computing the exact solution took about 61 ms of CPU time;
verifying it took about 19 ms of CPU time.

On 8/21/10, Richard Mathar <mathar at strw.leidenuniv.nl> wrote:
>
> http://list.seqfan.eu/pipermail/seqfan/2010-August/005740.html says
>
> ea> "To find 3 consecutive naturals in S,
> ea> you have to take 4 consecutive terms
> ea> of S -- no less":
> ea> 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,...
>
> Confirming Alex we see that this falls into the pattern
>
> a(n)= +a(n-1) +a(n-3) -a(n-4)
> = (n+3+5*A049347(n-1))/3  (assuming offset 0)
> also known as the ocean of
> <a href="Sindx_Rea.html#recLCC">Index to sequences with linear recurrences
> with constant coefficients</a>, signature (1,0,1,-1).
>
> Generating function
> (1+2*x+x^3-3*x^2)/(1+x+x^2)/(x-1)^2
>
> These almost-no-growth sequences are bad for the economy.
>
> RJM
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>

```