Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A373232
Relative of Hofstadter Q-sequence: a(n) = 0 for n <= 0, a(n) = n for 1 <= n <= 12; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 12.
7
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 6, 13, 14, 15, 9, 16, 17, 18, 12, 19, 20, 21, 15, 22, 23, 17, 25, 18, 25, 27, 28, 22, 21, 35, 31, 19, 30, 31, 40, 25, 31, 27, 47, 31, 33, 24, 46, 35, 43, 24, 51, 32, 49, 33, 44, 37, 55, 40, 39, 46, 50, 44, 43, 54, 47, 40, 58, 50, 43, 57, 53
OFFSET
1,2
COMMENTS
Similar to A278055 but with different starting values.
a(45) = 47. 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 45 terms.
Much like the Hofstadter Q-sequence A005185, it is not known if this sequence is defined for all positive n.
a(n) exists for n <= 3*10^7.
MATHEMATICA
a[n_] := a[n] = Which[n < 1, 0, n < 13, 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 *)
CROSSREFS
Similar sequences based on the Q-recurrence: A278056, A278057, A278058, A278059, A278060, A278061, A278062, A278063, A278064, A278065.
Sequence in context: A297242 A043272 A278064 * A333358 A305795 A319705
KEYWORD
nonn
AUTHOR
Nathan Fox, May 28 2024
STATUS
approved