login
a(1)=3, a(2)=6, a(3)=3; thereafter a(n) = a(n-a(n-1)) + a(n-1-a(n-2)).
2

%I #19 Oct 23 2024 08:47:49

%S 3,6,3,3,9,6,3,12,9,3,15,12,3,18,15,3,21,18,3,24,21,3,27,24,3,30,27,3,

%T 33,30,3,36,33,3,39,36,3,42,39,3,45,42,3,48,45,3,51,48,3,54,51,3,57,

%U 54,3,60,57,3,63,60,3,66,63,3,69,66,3,72,69

%N a(1)=3, a(2)=6, a(3)=3; thereafter a(n) = a(n-a(n-1)) + a(n-1-a(n-2)).

%C Same recurrence as in A046699 but with different starting values.

%C This sequence is quasilinear.

%H Nathan Fox, <a href="/A275363/b275363.txt">Table of n, a(n) for n = 1..1000</a>

%H Nathan Fox, <a href="https://arxiv.org/abs/1609.06342">Finding Linear-Recurrent Solutions to Hofstadter-Like Recurrences Using Symbolic Computation</a>, arXiv:1609.06342 [math.NT], 2016.

%H <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,2,0,0,-1).

%F a(3n) = 3n, a(3n+1) = 3, a(3n+2) = 3n+6.

%F a(n) = 2*a(n-3) - a(n-6) for n>6.

%F G.f.: -(3*x^4 +3*x^3 -3*x^2 -6*x-3)/((x-1)^2*(x^2+x+1)^2).

%t Flatten[Array[{3, 3*# + 6, 3*# + 3} &, 30, 0]] (* _Paolo Xausa_, Oct 23 2024 *)

%Y Cf. A046699, A005185, A244477.

%K nonn

%O 1,1

%A _Nathan Fox_, Jul 24 2016