A326791 For n > 1, let f_n be the lexicographically earliest sequence of distinct positive terms such that f_n(1) = 1, f_n(2) = n, and for k > 2, f_n(k) divides f_n(k-2) + f_n(k-1); if f_n is finite, then a(n) is the number of terms of f_n, otherwise a(n) = -1; a(1) = 1.
1, 39, 23, 5, 10, 9, 31, 8, 8, 8, 7, 8, 7, 9, 10, 29, 9, 38, 36, 13, 14, 13, 8, 12, 40, 19, 11, 25, 10, 15, 13, 18, 11, 5, 39, 36, 40, 37, 12, 25, 11, 12, 29, 30, 33, 25, 32, 5, 40, 25, 12, 25, 11, 21, 40, 27, 18, 19, 17, 9, 41, 18, 11, 5, 41, 37, 40, 12, 29
Offset: 1
Keywords
Examples
For n = 2: - f_2 corresponds to A085947 which is finite with 39 terms, - hence a(2) = 39.
Links
- Rémy Sigrist, PARI program for A326791
Crossrefs
Cf. A085947.
Programs
-
PARI
See Links section.
Comments