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.

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

Original entry on oeis.org

1, 1, 1, 3, 7, 8, 3, 8, 10, 4, 5, 12, 19, 11, 4, 19, 27, 11, 8, 22, 23, 11, 13, 25, 23, 21, 12, 29, 35, 12, 9, 35, 48, 23, 12, 44, 34, 24, 11, 62, 39, 10, 51, 30, 16, 31, 55, 62, 11, 11, 124, 78, 10, 30, 39, 79, 23, 20, 55, 103, 47, 7, 98
Offset: 1

Views

Author

Nathan Fox, Feb 23 2016

Keywords

Comments

This sequence has exactly 416 terms. a(416) = 0, so an attempt to calculate a(417) would refer to itself.
Without the convention that a(n) = 0 for n <= 0, this sequence would have exactly five terms, since computing a(6) refers to a(-1).

Examples

			a(10) = 4 because a(9) is 10, a(8) is 8, and a(7) is 3, so we take a(10 - 10) + a(10 - 8) + a(10 - 3) = a(0) + a(2) + a(7) = 0 + 1 + 3 = 4.
		

Crossrefs