OFFSET
0,3
COMMENTS
This sequence is well defined as the random Fibonacci sequence A092942 contains every nonnegative integers.
LINKS
Rémy Sigrist, Table of n, a(n) for n = 0..10000
James Grime, Random Fibonacci Numbers, Numberphile video (2020).
Rémy Sigrist, C program for A336717
FORMULA
a(A000045(n)) = n for any n <> 2.
EXAMPLE
For n = 4:
- random Fibonacci sequences R may start as follows:
R(0) R(1) R(2) R(3) R(4) R(5) R(6)
---- ---- ---- ---- ---- ---- ----
0 1 1 2 3 5 8
0 1 1 2 3 5 2
0 1 1 2 3 1 4
0 1 1 2 3 1 -2
0 1 1 2 1 3 4
0 1 1 2 1 3 2
0 1 1 2 1 -1 0
0 1 1 2 1 -1 -2
0 1 1 0 1 1 2
0 1 1 0 1 1 0
0 1 1 0 -1 -1 0
0 1 1 0 -1 -1 -2
- the value 4 first appears in column R(6),
- so a(4) = 6.
PROG
(C) See Links section.
CROSSREFS
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Aug 01 2020
STATUS
approved