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.

Showing 1-2 of 2 results.

A331703 Index of first occurrence of n in A328294, or 0 if n never appears.

Original entry on oeis.org

1, 2, 7, 14, 15, 13, 21, 28, 19, 40, 159, 79, 56, 47, 27, 36, 33, 58, 64, 81, 68, 90, 60, 85, 83, 132, 170, 107, 127, 80, 114, 55, 51, 109, 191, 152, 134, 171, 202, 192, 164, 138, 513, 96, 97, 166, 129, 126, 377, 651, 369, 95, 351, 232, 530, 244, 137, 110
Offset: 1

Views

Author

Robin Powell, Jan 25 2020

Keywords

Crossrefs

A361614 Set a(1)=0 and a(2)=1. For n > 1, if a(n) has already appeared in the sequence, then a(n+1) = number of steps since its first appearance. If a(n) has not appeared before, search instead for a(n)-1, then a(n)-2, etc., until you find a number that has appeared before.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 1, 5, 2, 4, 4, 1, 10, 5, 6, 7, 1, 15, 5, 11, 7, 5, 14, 3, 18, 7, 10, 14, 5, 21, 5, 23, 2, 28, 2, 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, 2, 58, 2, 60, 2, 62, 2, 64, 2, 66, 2, 68, 2, 70, 2
Offset: 1

Views

Author

Robin Powell, Mar 17 2023

Keywords

Comments

The first 32 terms are distributed chaotically, after which the sequence alternates between 2 and n-6 indefinitely.

Examples

			We start with a(1) = 0 and a(2) = 1. 1 has not appeared before, so we search for the greatest valid integer less than 1, which in this case is 0. 0 first occurred at a(1), which is 1 term before a(2) so a(3) = 1.
1 first occurred 1 term before, so a(4) = 1.
1 appeared at term a(1), which is 2 terms before a(4), so a(5) = 2.
2 has not appeared before, so we search for 1, which occurred 3 terms before at a(1). a(6) = 3.
And so on.
		

Crossrefs

Showing 1-2 of 2 results.