login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A378243
a(n) is the least k > 0 such that n belongs to a Fibonacci-like sequence starting with initial values A378242(i) and A378242(j) for some i, j <= n.
2
1, 2, 2, 2, 3, 2, 4, 4, 2, 3, 4, 5, 3, 2, 3, 5, 4, 5, 4, 6, 3, 2, 5, 3, 7, 6, 4, 8, 5, 9, 4, 8, 3, 4, 2, 5, 10, 3, 6, 6, 9, 5, 4, 7, 6, 5, 8, 10, 4, 6, 11, 8, 3, 4, 7, 2, 9, 6, 5, 6, 3, 11, 9, 10, 9, 6, 12, 5, 4, 6, 12, 13, 7, 5, 7, 13, 10, 9, 4, 6, 7, 8, 9, 8
OFFSET
0,2
LINKS
Rémy Sigrist, C++ program
FORMULA
a(A378242(n)) = n, and this is the first occurrence of n in the sequence.
a(n) = 2 iff n is a positive Fibonacci number.
EXAMPLE
The first terms, alongside possible values for i and j, are:
n a(n) i j A378242(i) A378242(j)
-- ---- - - ---------- ----------
0 1 1 1 0 0
1 2 1 2 0 1
2 2 1 2 0 1
3 2 1 2 0 1
4 3 1 3 0 4
5 2 1 2 0 1
6 4 1 4 0 6
7 4 2 4 1 6
8 2 1 2 0 1
9 3 2 3 1 4
10 4 3 4 4 6
PROG
(C++) // See Links section.
CROSSREFS
Cf. A378242.
Sequence in context: A035433 A029199 A121611 * A360106 A300066 A286545
KEYWORD
nonn
AUTHOR
Rémy Sigrist, Nov 20 2024
STATUS
approved