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.

A373239 Relative of Hofstadter Q-sequence: a(n) = max(0, n+118) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.

This page as a plain text file.
%I A373239 #10 May 30 2024 22:11:52
%S A373239 6,119,120,121,9,122,123,124,12,125,126,127,15,128,129,17,131,18,131,
%T A373239 133,134,22,21,247,241,9,18,256,259,127,22,148,153,131,27,36,155,246,
%U A373239 122,39,156,162,126,42,158,165,16,157,165,145,40,157,55,260,134,46,167,178,25,38,58,523,250,122,61,71,299,238,116,72,190,192
%N A373239 Relative of Hofstadter Q-sequence: a(n) = max(0, n+118) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.
%C A373239 Sequences like this are more naturally considered with the first nonzero term in position 1. But this sequence would then match A000027 for its first 118 terms.
%C A373239 This sequence has exactly 127 terms (of positive index). a(127) = 0, so an attempt to calculate a(128) would refer to itself.
%C A373239 Without the convention that a(n) = 0 for n <= -118, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-222).
%C A373239 If 118 in this sequence's definition is replaced by any larger number congruent to 6 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.
%H A373239 Nathan Fox, <a href="/A373239/b373239.txt">Table of n, a(n) for n = 1..127</a>
%F A373239 If the index is between 67 and 118 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+120, a(7n+2) = 7n+122, a(7n+3) = 7, a(7n+4) = 2n+281, a(7n+5) = n+229, a(7n+6) = 116.
%Y A373239 Cf. A005185, A267501, A278055, A373234, A373235, A373236, A373237, A373238, A274058.
%K A373239 nonn,fini,full
%O A373239 1,1
%A A373239 _Nathan Fox_, May 28 2024