login
A081834
a(1)=1, a(n)=a(n-1)+4 if n is already in the sequence, a(n)=a(n-1)+3 otherwise.
2
1, 4, 7, 11, 14, 17, 21, 24, 27, 30, 34, 37, 40, 44, 47, 50, 54, 57, 60, 63, 67, 70, 73, 77, 80, 83, 87, 90, 93, 97, 100, 103, 106, 110, 113, 116, 120, 123, 126, 130, 133, 136, 139, 143, 146, 149, 153, 156, 159, 163, 166, 169, 172, 176, 179, 182, 186, 189, 192, 196
OFFSET
1,2
LINKS
FORMULA
a(n)=floor(rn-(3r-1)/(r+1)) where r= (1/2) *(3+sqrt(13))
PROG
(Haskell)
a081834 n = a081834_list !! (n-1)
a081834_list = 1 : f 2 [1] where
f x zs@(z:_) = y : f (x + 1) (y : zs) where
y = z + (if x `elem` zs then 4 else 3)
-- Reinhard Zumkeller, Sep 26 2014
CROSSREFS
Cf. A064437.
Cf. A080590.
Sequence in context: A212447 A172513 A327737 * A078309 A195171 A184623
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Apr 11 2003
STATUS
approved