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

%I #9 May 02 2019 15:43:45

%S 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,

%T 26,27,28,29,30,31,32,33,34,35,36,37,38,111,40,41,42,43,44,45,46,47,

%U 48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66

%N 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).

%C 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.

%H Ivan Neretin, <a href="/A138153/b138153.txt">Table of n, a(n) for n = 1..10000</a>

%t 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 *)

%Y Cf. A000040, A000073, A060000, A060013.

%K easy,nonn

%O 1,2

%A _Jonathan Vos Post_, May 04 2008

%E Data corrected by _Giovanni Resta_, Jun 20 2016

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 August 20 22:00 EDT 2024. Contains 375340 sequences. (Running on oeis4.)