login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A247799 a(0) = 1; a(n) = a(n-1) + (if n = a(k) for some k then k else n). 1
0, 1, 3, 5, 9, 12, 18, 25, 33, 37, 47, 58, 63, 76, 90, 105, 121, 138, 144, 163, 183, 204, 226, 249, 273, 280, 306, 333, 361, 390, 420, 451, 483, 491, 525, 560, 596, 605, 643, 682, 722, 763, 805, 848, 892, 937, 983, 993, 1041, 1090, 1140, 1191, 1243, 1296 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
COMMENTS
a(n) <= A000217(n).
LINKS
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (maybe)
a247799 n = a247799_list !! n
a247799_list = 0 : f 1 [0] where
f x zs@(z:_) = y : f (x + 1) (y : zs) where
y = z + maybe x id (elemIndex x $ reverse zs)
CROSSREFS
Cf. A000217.
Sequence in context: A005766 A211538 A368613 * A265702 A190310 A046746
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Sep 26 2014
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 10 01:03 EDT 2024. Contains 372354 sequences. (Running on oeis4.)