Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Relative of Hofstadter Q-sequence: a(n) = n for 1 <= n <= 7; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 7.
7

%I #15 May 31 2024 14:33:17

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

%T 22,21,21,22,26,25,23,24,28,26,29,26,31,30,32,28,34,30,37,29,38,35,37,

%U 33,39,40,38,37,42,43,40,40,44,42,47,43,44,46,51,46,46,50,50,50,51,53,50

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

%C Similar to A278055 but with different starting values.

%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="/A373227/b373227.txt">Table of n, a(n) for n = 1..10000</a>

%t a[n_] := a[n] = If[0 < n < 8, n, a[n-a[n-1]] + a[n-a[n-2]] + a[n-a[n-3]]];

%t Array[a, 100] (* _Paolo Xausa_, May 31 2024 *)

%Y Cf. A005185, A278055, A373228, A373229, A373230, A373231, 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