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.

A264756 An eventually quasilinear solution to Hofstadter's Q recurrence.

This page as a plain text file.
%I A264756 #28 Nov 16 2024 18:48:23
%S A264756 1,0,3,3,2,6,3,2,9,3,2,12,3,2,15,3,2,18,3,2,21,3,2,24,3,2,27,3,2,30,3,
%T A264756 2,33,3,2,36,3,2,39,3,2,42,3,2,45,3,2,48,3,2,51,3,2,54,3,2,57,3,2,60,
%U A264756 3,2,63,3,2,66,3,2,69,3,2,72,3,2,75,3,2,78,3,2,81
%N A264756 An eventually quasilinear solution to Hofstadter's Q recurrence.
%C A264756 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(n) = 0 if n <= 0; a(1) = 1, a(2) = 0, a(3) = 3, a(4) = 3, a(5) = 2.
%H A264756 Colin Barker, <a href="/A264756/b264756.txt">Table of n, a(n) for n = 1..1000</a>
%H A264756 Nathan Fox, <a href="http://arxiv.org/abs/1511.06484">Quasipolynomial Solutions to the Hofstadter Q-Recurrence</a>, arXiv preprint arXiv:1511.06484 [math.NT], 2015.
%H A264756 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 A264756 <a href="/index/Rec#order_06">Index entries for linear recurrences with constant coefficients</a>, signature (0,0,2,0,0,-1).
%F A264756 a(1) = 1, a(2) = 0; thereafter a(3n) = 3n, a(3n+1) = 3, a(3n+2) = 2.
%F A264756 From _Colin Barker_, Nov 23 2015: (Start)
%F A264756 a(n) = 2*a(n-3) - a(n-6) for n>8.
%F A264756 G.f.: -x*(2*x^7+2*x^6-2*x^4-x^3-3*x^2-1) / ((x-1)^2*(x^2+x+1)^2).
%F A264756 (End)
%F A264756 a(1) = 1, a(2) = 0, a(n) = 2 + (n-3)*(1 + floor(-n/3) + floor(n/3)) - floor(-(n+1)/3) - floor((n+1)/3) for n>2. - _Wesley Ivan Hurt_, Nov 24 2015
%t A264756 CoefficientList[Series[-(2*x^7 + 2*x^6 - 2*x^4 - x^3 - 3*x^2 - 1)/((x - 1)^2*(x^2 + x + 1)^2), {x, 0, 100}], x] (* _Wesley Ivan Hurt_, Nov 24 2015 *)
%t A264756 Join[{1, 0}, LinearRecurrence[{0, 0, 2, 0, 0, -1}, {3, 3, 2, 6, 3, 2}, 100]] (* _Vincenzo Librandi_, Nov 25 2015 *)
%o A264756 (PARI) Vec(-x*(2*x^7+2*x^6-2*x^4-x^3-3*x^2-1)/((x-1)^2*(x^2+x+1)^2) + O(x^100)) \\ _Colin Barker_, Nov 23 2015
%o A264756 (Magma) [1,0] cat [2+(n-3)*(1+Floor(-n/3)+Floor(n/3))-Floor(-(n+1)/3)-Floor((n+1)/3): n in [3..100]]; // _Vincenzo Librandi_, Nov 25 2015
%Y A264756 Cf. A005185, A188670, A244477, A264757, A264758.
%K A264756 nonn,easy
%O A264756 1,3
%A A264756 _Nathan Fox_, Nov 23 2015