login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Relative of Hofstadter Q-sequence: a(n) = n for 1 <= n <= 9; a(n) = a(n-a(n-1)) + a(n-a(n-2)) for n > 9.
18

%I #21 May 30 2024 03:05:06

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

%T 27,12,18,15,25,23,19,18,28,19,13,22,25,17,27,21,25,24,34,17,27,44,18,

%U 30,38,18,35,27,27,36,34,26,33,45,25,28,50

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

%C Similar to Hofstadter's Q-sequence A005185 but with different starting values.

%C Much like the Hofstadter Q-sequence, 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="/A278061/b278061.txt">Table of n, a(n) for n = 1..10000</a>

%H Nathan Fox, <a href="https://vimeo.com/191094180">Hofstadter-like Sequences over Nonstandard Integers</a>, Talk given at the Rutgers Experimental Mathematics Seminar, November 10 2016.

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

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

%o (Magma) [n le 9 select n else Self(n-Self(n-1))+Self(n-Self(n-2)): n in [1..70]]; // _Bruno Berselli_, Nov 15 2016

%Y Cf. A005185, A278056, A278057, A278058, A278059, A278060, A278062, A278063, A278064, A278065.

%K nonn

%O 1,2

%A _Nathan Fox_, Nov 10 2016