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.

A274058 Relative of Hofstadter Q-sequence: a(n) = max(0, n+32478) 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 A274058 #26 May 30 2024 22:10:47
%S A274058 6,32479,32480,32481,9,32482,32483,32484,12,32485,32486,32487,15,
%T A274058 32488,32489,17,32491,18,32491,32493,32494,22,21,64967,64961,9,18,
%U A274058 64976,64979,32487,22,32508,32513,32491,27,36,32515,64966,32482,39,32516,32522
%N A274058 Relative of Hofstadter Q-sequence: a(n) = max(0, n+32478) for n <= 0; a(n) = a(n-a(n-1)) + a(n-a(n-2)) + a(n-a(n-3)) for n > 0.
%C A274058 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 32478 terms.
%C A274058 This sequence has exactly 37025 terms (of positive index).  a(37025) = 0, so an attempt to calculate a(37026) would refer to itself.
%C A274058 Without the convention that a(n) = 0 for n <= -32478, this sequence would have exactly 24 terms (of positive index), since computing a(25) refers to a(-64942).
%C A274058 If 32478 in this sequence's definition is replaced by any larger number congruent to 5 mod 7, the behavior is essentially the same, though the quasilinear part (see Formula section) lasts longer.
%H A274058 Nathan Fox, <a href="/A274058/b274058.txt">Table of n, a(n) for n = 1..37025</a>
%H A274058 N. Fox, <a href="https://vimeo.com/191094180">Hofstadter-like Sequences over Nonstandard Integers"</a>, Talk given at the Rutgers Experimental Mathematics Seminar, November 10 2016.
%F A274058 If the index is between 67 and 32479 (inclusive), then a(7n) = 7n+2, a(7n+1) = 7n+32480, a(7n+2) = 7n+32482, a(7n+3) = 7, a(7n+4) = 2n+65001, a(7n+5) = n+64949, a(7n+6) = 32476.
%t A274058 a[n_] := a[n] = If[n <= 0, Max[0, n + 2^15 - 290], a[n - a[n - 1]] + a[n - a[n - 2]] + a[n - a[n - 3]]]; Array[a, 42] (* _Robert G. Wilson v_, Mar 19 2017 *)
%Y A274058 Cf. A005185, A267501, A278055, A373234, A373235, A373236, A373237, A373238, A373239.
%K A274058 nonn,fini,full
%O A274058 1,1
%A A274058 _Nathan Fox_, Nov 10 2016
%E A274058 Formula and definition corrected by _Nathan Fox_, Mar 18 2017