login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons 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

Reinhard Zumkeller, Table of n, a(n) for n = 0..1000

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: A060419 A005766 A211538 * A265702 A190310 A046746

Adjacent sequences:  A247796 A247797 A247798 * A247800 A247801 A247802

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 | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 28 10:49 EDT 2020. Contains 334681 sequences. (Running on oeis4.)