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 A275365 #14 Feb 19 2019 04:11:01 %S A275365 0,2,2,4,2,6,2,8,2,10,2,12,2,14,2,16,2,18,2,20,2,22,2,24,2,26,2,28,2, %T A275365 30,2,32,2,34,2,36,2,38,2,40,2,42,2,44,2,46,2,48,2,50,2,52,2,54,2,56, %U A275365 2,58,2,60,2,62,2,64,2,66,2,68,2,70,2,72,2,74 %N A275365 a(1)=2, a(2)=2; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)). %C A275365 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) = 2, a(2) = 2. %C A275365 Starting with n=1, a(n) is A005843 interleaved with A007395. %C A275365 This sequence is the same as A133265 with the leading 2 changed to a 0. %H A275365 Nathan Fox, <a href="/A275365/b275365.txt">Table of n, a(n) for n = 0..1000</a> %H A275365 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 A275365 <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (0,2,0,-1). %F A275365 a(0) = 0; thereafter, a(2n) = 2, a(2n+1) = 2n+2. %F A275365 a(n) = 2*a(n-2) - a(n-4) for n>4. %F A275365 G.f.: -(2*x^3 -2*x -2)/((x-1)^2*(x+1)^2). %t A275365 Join[{0}, LinearRecurrence[{0, 2, 0, -1}, {2, 2, 4, 2}, 73]] (* _Jean-François Alcover_, Feb 19 2019 *) %Y A275365 Cf. A005185, A133265, A188670, A244477, A264756, A264757, A264758, A268368, A275153, A275361, A275362. %K A275365 easy,nonn %O A275365 0,2 %A A275365 _Nathan Fox_, Jul 24 2016