login
Relative of Hofstadter Q-sequence: a(n) = 0 for n <= 0, a(n) = n for 1 <= n <= 11; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 11.
7

%I #10 Jun 03 2024 18:20:30

%S 1,2,3,4,5,6,7,8,9,10,11,6,12,13,14,9,15,16,17,12,18,19,20,15,21,22,

%T 17,24,18,24,26,27,22,21,33,30,20,29,36,27,24,36,33,31,28,42,31,33,32,

%U 48,36,25,44,44,46,22,56,38,41,40,50,43,44,43,56,49,42,45,44,67,43,47,52

%N Relative of Hofstadter Q-sequence: a(n) = 0 for n <= 0, a(n) = n for 1 <= n <= 11; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 11.

%C Similar to A278055 but with different starting values.

%C a(117) = 120. This is the smallest index for which a(n) > n. So, without the condition that a(n) = 0 for n <= 0, this sequence would be finite and have exactly 117 terms.

%C Much like the Hofstadter Q-sequence A005185, it is not known if this sequence is defined for all positive n.

%C a(n) exists for n <= 3*10^7.

%H Nathan Fox, <a href="/A373231/b373231.txt">Table of n, a(n) for n = 1..10000</a>

%t a[n_] := a[n] = Which[n < 1, 0, n < 12, n, True, a[n-a[n-1]] + a[n-a[n-2]] + a[n-a[n-3]]]; Array[a, 100] (* _Paolo Xausa_, May 31 2024 *)

%Y Cf. A005185, A278055, A373227, A373228, A373229, A373230, A373232, A373233.

%Y Similar sequences based on the Q-recurrence: A278056, A278057, A278058, A278059, A278060, A278061, A278062, A278063, A278064, A278065.

%K nonn

%O 1,2

%A _Nathan Fox_, May 28 2024