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.

A283895 Relative of Hofstadter Q-sequence: a(1) = 41, a(2) = 2; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)).

This page as a plain text file.
%I A283895 #4 Mar 19 2017 19:26:02
%S A283895 41,2,41,2,41,2,41,2,41,2,41,2,41,2,41,2,41,2,41,2,41,2,41,2,41,2,41,
%T A283895 2,41,2,41,2,41,2,41,2,41,2,41,2,41,43,2,84,2,84,2,84,2,84,2,84,2,84,
%U A283895 2,84,2,84,2,84,2,84,2,84,2,84,2,84,2,84,2,84,2,84,2
%N A283895 Relative of Hofstadter Q-sequence: a(1) = 41, a(2) = 2; thereafter a(n) = a(n-a(n-1)) + a(n-a(n-2)).
%C A283895 In calculating terms of this sequence, use the convention that a(n)=0 for n<=0.
%C A283895 Most terms in this sequence alternate between 2 and a large constant. Such runs of terms are eventually separated by either 224 or 562 other terms, and each run is approximately twice as long as the previous.
%H A283895 Nathan Fox, <a href="/A283895/b283895.txt">Table of n, a(n) for n = 1..50000</a>
%p A283895 A283895:=proc(n) option remember: if n <= 0 then 0: elif n = 1 then 41: elif n = 2 then 2: else A283895(n-A283895(n-1)) + A283895(n-A283895(n-2)): fi: end:
%Y A283895 Cf. A005185, A278066, A278067, A278068, A283893, A283894, A283896, A283897.
%K A283895 nonn
%O A283895 1,1
%A A283895 _Nathan Fox_, Mar 19 2017