# [seqfan] Re: possible relation in A005132 Recaman's sequence

David Wilson dwilson at gambitcomm.com
Wed Jun 3 16:19:15 CEST 2009

```a(n) certainly has to satisfy some such recurrence.

By the definition of Recaman, it is easy to show

 |a(n+1) - a(n)| = n+1

hence

 (a(n+1) - a(n))^2 = (n+1)^2 = f(n)

But f(n) = (n+1)^2 satisfies the recurrence

 f(n+2) - 2f(n+1) + f(n) - 2 = 0

I highly suspect that plugging f(n) = (a(n+1) - a(n))^2 into  and
properly translating the index results in your recurrence.

So your recurrence is likely true, but it is in reality an arcane way of
saying . Any sequence satisfying , e.g, A000217 or A008344(n+1),
would also satisfy your recurrence.

Georgi Guninski wrote:
> http://www.research.att.com/~njas/sequences/?q=A005132&sort=0&fmt=0&language=english&go=Search
> A005132  Recaman's sequence: a(0) = 0; for n > 0, a(n) = a(n-1)-n if
> that number is positive and not already in the sequence, otherwise a(n)
> = a(n-1)+n
>
> seems to satisfy:
>
> a(n-2)^2 - 2*a(n-2)*a(n-1) - a(n-1)^2 + 4*a(n-1)*a(n) - a(n)^2
> - 2*a(n)*a(n+1) + a(n+1)^2 - 2 = 0
>
> ( x^2 - 2*x*y - y^2 + 4*y*z - z^2 - 2*z*t + t^2 - 2 = 0 )
>
> verified to 10^5 using the B file from OEIS.
>
>
>
> _______________________________________________
>
> Seqfan Mailing list - http://list.seqfan.eu/
>
>

```