This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A283904 #8 Mar 18 2024 12:12:15 %S A283904 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 A283904 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 A283904 29,1,29,31,1,31,32,1,32,34,1,34,35,1,35,37,1 %N A283904 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 A283904 This sequence is eventually quasilinear with period 6. Each component sequence has slope 0 or 1/2. %H A283904 Nathan Fox, <a href="/A283904/b283904.txt">Table of n, a(n) for n = 1..10000</a> %H A283904 <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 A283904 If the index is at least 41: %F A283904 a(6n) = 1 %F A283904 a(6n+1) = 3n-1 %F A283904 a(6n+2) = 3n+1 %F A283904 a(6n+3) = 1 %F A283904 a(6n+4) = 3n+1 %F A283904 a(6n+5) = 3n+2. %F A283904 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 A283904 a(n) = a(n-3) + a(n-6) - a(n-9) for n > 49. %p A283904 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 A283904 Cf. A005185, A188670, A244477. %K A283904 nonn %O A283904 1,4 %A A283904 _Nathan Fox_, Mar 19 2017