OFFSET
0,3
COMMENTS
The sequence is unbounded (if the sequence was bounded, with greatest value m, then, by the pigeonhole principle, some value, say v, would appear infinitely many times, and the next value after the (m+1)-th occurrence of v would be > m, a contradiction).
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..15722
Rémy Sigrist, C program
Rémy Sigrist, Scatterplot of the first 350000 terms
EXAMPLE
The first terms, alongside the corresponding pairs (i,j), are:
n a(n) (i,j)'s
-- ---- ---------------------------------
0 0 N/A
1 1 (0,0)
2 3 (0,1), (1,1)
3 1 (2,2)
4 4 (0,1), (1,1), (3,3)
5 1 (4,4)
6 5 (0,1), (1,1), (3,3), (5,5)
7 5 (3,4), (4,5), (6,6)
8 10 (3,4), (4,5), (4,7), (6,6), (7,7)
9 4 (6,8), (8,8)
10 12 (3,5), (3,7), (4,4), (5,6), (9,9)
11 18 (0,8), (1,8), (10,10)
12 1 (11,11)
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Rémy Sigrist, Dec 06 2022
STATUS
approved