A285182 L = A132468(n) = A048669(n)-1 is the length of the longest run of consecutive numbers that have a common factor with n; a(n) = smallest k >= 0 which starts such a run.
0, 0, 0, 0, 2, 0, 0, 0, 4, 0, 2, 0, 6, 5, 0, 0, 2, 0, 4, 6, 10, 0, 2, 0, 12, 0, 6, 0, 2, 0, 0, 11, 16, 14, 2, 0, 18, 12, 4, 0, 6, 0, 10, 5, 22, 0, 2, 0, 4, 17, 12, 0, 2, 10, 6, 18, 28, 0, 2, 0, 30, 6, 0, 25, 8, 0, 16, 23, 4, 0, 2, 0, 36, 5, 18, 21, 12, 0, 4, 0, 40, 0, 6, 34, 42, 29, 10, 0, 2, 13, 22, 30
Offset: 2
Keywords
Examples
If n = 6, among the numbers k = 0,1,2,3,4,5,6,7,... there is a run of L = 3 consecutive numbers, 2,3,4, all with gcd(k,6)>1, starting at k=2, so a(6) = 2. If n is a prime (or prime power), a(n)=0.
Links
- Rémy Sigrist, Table of n, a(n) for n = 2..20000
Comments