login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A080096 a(1)=a(2)=1; a(3)=2; a(n)=abs(a(n-1)-a(n-2)-a(n-3)). 7
1, 1, 2, 0, 3, 1, 2, 2, 1, 3, 0, 4, 1, 3, 2, 2, 3, 1, 4, 0, 5, 1, 4, 2, 3, 3, 2, 4, 1, 5, 0, 6, 1, 5, 2, 4, 3, 3, 4, 2, 5, 1, 6, 0, 7, 1, 6, 2, 5, 3, 4, 4, 3, 5, 2, 6, 1, 7, 0, 8, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 6, 2, 7, 1, 8, 0, 9, 1, 8, 2, 7, 3, 6, 4, 5, 5, 4, 6, 3, 7, 2, 8, 1, 9, 0, 10, 1, 9, 2, 8, 3, 7, 4, 6, 5 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,3

LINKS

Reinhard Zumkeller, Table of n, a(n) for n = 1..10000

FORMULA

For n>=3 Max( a(k) : 1<=k<=n ) = floor ( sqrt(n+4)).

Special cases: a(n^2+4*n-1)=0; a(n^2-4)=n

Also a( A028557(n))= a(A028557(n+1)); sum(k=(n-1)^2, n^2, a(k)) = n^2

PROG

(PARI) a(n)=local(k, m); if(n<1, 0, k=sqrtint(n+4); m=n+4-k^2; if(m%2, m\2+1, k-m\2))

(Haskell)

a080096 n = a080096_list !! (n-1)

a080096_list = 1 : 1 : 2 : zipWith3 (\u v w -> abs (w - v - u))

               a080096_list (tail a080096_list) (drop 2 a080096_list)

-- Reinhard Zumkeller, Oct 11 2014

CROSSREFS

Cf. A028347.

Cf. A077623, A077653, A079623, A079624, A088226.

Sequence in context: A051709 A218585 A054656 * A068915 A133925 A071492

Adjacent sequences:  A080093 A080094 A080095 * A080097 A080098 A080099

KEYWORD

nonn

AUTHOR

Benoit Cloitre, Jan 28 2003

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified March 1 15:50 EST 2015. Contains 255118 sequences.