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!)
A138153 If the numbers a(1)...a(n) contain a hole, then a(n+1) is the smallest hole; otherwise a(n+1) = a(n-2) + a(n-1) + a(n). 2
1, 2, 3, 6, 4, 5, 15, 7, 8, 9, 10, 11, 12, 13, 14, 39, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 111, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
This is to A060000 as tribonacci A000073 is to Fibonacci A000045. Let H be the set of positive numbers less than a(n) which are not equal to some a(i), i < n. This H is the 'set of holes so far'. If H is nonempty, then define a(n+1) = minimum(H). Otherwise define a(n+1) = a(n-2) + a(n-1) + a(n). Permutation of the natural numbers with inverse not yet in the OEIS.
LINKS
MATHEMATICA
a[n_] := a[n] = If[n < 4, n, Block[{s = Array[a, n-1]}, s = Complement[ Range[ Max@s], s]; If[s == {}, a[n - 1] + a[n - 2] + a[n - 3], First[s]]]]; Array[a, 80] (* Giovanni Resta, Jun 20 2016 *)
CROSSREFS
Sequence in context: A254106 A373323 A072637 * A353590 A209775 A360599
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, May 04 2008
EXTENSIONS
Data corrected by Giovanni Resta, Jun 20 2016
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 July 1 13:20 EDT 2024. Contains 373917 sequences. (Running on oeis4.)