A387542 a(n) is the distance from the n-th term of A386482 to the nearest term of A386482 coprime to it.
0, 1, 2, 3, 2, 2, 4, 2, 2, 4, 2, 2, 2, 2, 3, 2, 3, 2, 5, 2, 3, 2, 3, 2, 3, 2, 3, 2, 2, 4, 2, 2, 2, 2, 3, 5, 4, 3, 5, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 2, 2, 3, 2, 2, 4, 2, 2, 2, 2, 3, 5, 5, 6, 5, 4, 3, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 5, 5, 6, 8, 8, 9, 11
Offset: 1
Examples
For n = 7: the GCD of A386482(7) = 12 and its neighboring terms are: d A387542(7+d) gcd(A387542(7), A387542(7+d)) -- ------------ ----------------------------- -4 4 4 -3 6 6 -2 3 3 -1 9 3 0 12 12 1 10 2 2 8 4 3 14 2 4 7 1 The nearest coprime term, A387542(11) = 7, is at distance 4, so a(7) = 4.
Links
- Rémy Sigrist, Table of n, a(n) for n = 1..10000
- Rémy Sigrist, PARI program
Crossrefs
Cf. A386482.
Programs
-
PARI
\\ See Links section.
Comments