Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #8 Mar 18 2024 12:12:15
%S 1,1,1,2,2,1,3,3,1,4,4,2,2,7,2,2,6,3,3,11,2,3,12,2,2,14,2,2,14,3,2,14,
%T 4,14,15,1,15,18,1,18,20,1,20,22,1,22,23,1,23,25,1,25,26,1,26,28,1,28,
%U 29,1,29,31,1,31,32,1,32,34,1,34,35,1,35,37,1
%N Relative of Hofstadter Q-sequence: a(1) = 1, a(2) = 1; thereafter a(n) = a(n-2a(n-1)) + a(n-3a(n-2)).
%C This sequence is eventually quasilinear with period 6. Each component sequence has slope 0 or 1/2.
%H Nathan Fox, <a href="/A283904/b283904.txt">Table of n, a(n) for n = 1..10000</a>
%H <a href="/index/Rec#order_09">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 1, 0, 0, 1, 0, 0, -1).
%F If the index is at least 41:
%F a(6n) = 1
%F a(6n+1) = 3n-1
%F a(6n+2) = 3n+1
%F a(6n+3) = 1
%F a(6n+4) = 3n+1
%F a(6n+5) = 3n+2.
%F G.f.: (-x^48-x^46-x^45-x^43+x^42+3*x^41+x^40-9*x^39-x^38+3*x^37+x^36-4*x^35+x^34+12*x^33+x^32-2*x^31+x^30+x^29-x^28+x^26-3*x^25-2*x^24-x^23+2*x^22-x^20+2*x^19+3*x^18-2*x^16-x^15+2*x^13-3*x^12+x^11-x^8+x^4+x^3+x^2+x+1) / ((1+x)*(1-x+x^2)*(-1+x)^2*(1+x+x^2)^2).
%F a(n) = a(n-3) + a(n-6) - a(n-9) for n > 49.
%p A283904:=proc(n) option remember: if n <= 0 then 0: elif n = 1 then 1: elif n = 2 then 1: else A283904(n-2*A283904(n-1)) + A283904(n-3*A283904(n-2)): fi: end:
%Y Cf. A005185, A188670, A244477.
%K nonn
%O 1,4
%A _Nathan Fox_, Mar 19 2017