1,3

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

Index entries for sequences related to Recamán's sequence.

(Haskell)

a088230 n = a088230_list !! (n-1)

a088230_list = 0 : f [1..] [0] where

f (x:xs) ys@(y:_)

| x <= y && (length $ filter (== z) ys) <= 1 = z : f xs (z : ys)

| otherwise = (x + y) : f xs ((x + y) : ys) where z = y - x

-- Reinhard Zumkeller, May 08 2012

Cf. A005132, A008344.

Sequence in context: A178593 A021332 A008344 * A181482 A330420 A072329

Adjacent sequences: A088227 A088228 A088229 * A088231 A088232 A088233

nonn

Reinhard Zumkeller, Nov 03 2003

approved