cp's OEIS Frontend

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.

A284429 A quasilinear solution to Hofstadter's Q recurrence.

This page as a plain text file.
%I A284429 #11 Mar 09 2024 11:44:47
%S A284429 2,1,3,5,1,3,8,1,3,11,1,3,14,1,3,17,1,3,20,1,3,23,1,3,26,1,3,29,1,3,
%T A284429 32,1,3,35,1,3,38,1,3,41,1,3,44,1,3,47,1,3,50,1,3,53,1,3,56,1,3,59,1,
%U A284429 3,62,1,3,65,1,3,68,1,3,71,1,3,74,1,3
%N A284429 A quasilinear solution to Hofstadter's Q recurrence.
%C A284429 a(n) is the solution to the recurrence relation a(n) = a(n-a(n-1)) +a(n-a(n-2)) [Hofstadter's Q recurrence], with the initial conditions: a(1) = 2, a(2) = 1.
%C A284429 This sequence is a close relative of A283878.
%H A284429 Nathan Fox, <a href="/A284429/b284429.txt">Table of n, a(n) for n = 1..10000</a>
%H A284429 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0, 0, 2, 0, 0, -1).
%F A284429 G.f.: (-3*x^5 - x^4 + x^3 + 3*x^2 + x + 2) / ((-1 + x)^2*(1 + x + x^2)^2).
%F A284429 a(n) = 2*a(n-3) - a(n-6) for n > 6.
%F A284429 a(3*k)   = 3,
%F A284429 a(3*k+1) = 3*k+2,
%F A284429 a(3*k+2) = 1.
%p A284429 A284429:=proc(n) option remember: if n <= 0 then 0: elif n = 1 then 2: elif n = 2 then 1: else A284429(n-A284429(n-1)) + A284429(n-A284429(n-2)): fi: end:
%t A284429 CoefficientList[Series[(-3*x^5 - x^4 + x^3 + 3*x^2 + x + 2) / ((-1 + x)^2*(1 + x + x^2)^2), {x, 0, 100}], x] (* _Indranil Ghosh_, Mar 27 2017 *)
%o A284429 (PARI) Vec((-3*x^5 - x^4 + x^3 + 3*x^2 + x + 2) / ((-1 + x)^2*(1 + x + x^2)^2) + O(x^100)) \\ _Indranil Ghosh_, Mar 27 2017
%Y A284429 Cf. A005185, A188670, A244477, A264756, A283878, A283879.
%K A284429 nonn,easy
%O A284429 1,1
%A A284429 _Nathan Fox_, Mar 26 2017