login
A091508
Least k such that b(k) = 1, where b(1) = n and b(k+1) = b(k)+k+1 if gcd(k+1, b(k)) = 1 or else b(k)/gcd(k+1, b(k)).
8
1, 2, 111, 7, 5, 3, 25, 22, 25, 111, 111, 4, 7, 5, 5, 6, 22, 25, 22, 9, 111, 25, 25, 4, 111, 111, 11, 111, 9, 7, 6, 8, 19, 5, 6, 19, 9, 22, 22, 111, 8, 22, 19, 9, 9, 111, 111, 111, 111, 25, 15, 11, 9, 111, 8, 111, 16, 11, 7, 5, 9, 9, 9, 15, 111, 6, 111, 10, 7, 19, 19, 19, 9, 6, 25
OFFSET
1,2
COMMENTS
I conjecture a(n) always exists. That means sequence (b(k)) becomes ultimately regular for any n. i.e. there is always k0 such that b(k0) = 1, so b(k0+1) = b(k0) + k0 = k0 + 1 since gcd(k0, b(k0)) = 1 and gcd(k0+1, b(k0+1)) = k0+1 implies b(k0+2) = b(k0+1)/(k0+1) = 1 and from that point k0 sequence (b(k)) continues : 1, k0+1, 1, k0+2, 1, k0+3,1,... and is "regular".
From Sam Chapman, Mar 30 2026: (Start)
a(k!) = k for all k. As such, every positive integer appears in this sequence at least once. 1, 2, and 3 each appear only once, whereas every other number appears more than once.
If m > k!, then a(m) > k, if a(m) exists. As such, there are a finite amount of values n such that a(n) = k.
Benoit's conjecture is true for all n <= 10^15. (End)
LINKS
FORMULA
a(n!) = n for all n >= 1. - Sam Chapman, Mar 30 2026
EXAMPLE
For n = 1 we have b(1) = 1, hence a(1) = 1.
For n = 2 we have b(1) = 2, then for k = 1 we have gcd(2, b(1)) = 2 and therefore b(2) = b(1)/2 = 1, thus a(2) = 2.
For n = 6 we have b(1) = 6, then for k = 1 we have gcd(2, b(1)) = 2 whence b(2) = 6/2 = 3. Then for k = 2 we have gcd(3, b(2)) = 3 whence b(3) = 3/3 = 1, and a(6) = 3. Similarly, for all n = m!, b(k) = m!/k! and a(n) = m.
PROG
(PARI) a(n)=if(n<0, 0, s=1; b=n; while(b>1, s++; b=if(gcd(s, b)-1, b/gcd(b, s), b+s)); s)
(PARI) apply( {A091508(n)=for(k=2, oo, if(n==1, return(k-1), gcd(n, k)>1, n\=gcd(n, k), n+=k))}, [1..99]) \\ M. F. Hasler, Apr 10 2026
CROSSREFS
Sequence in context: A063668 A006334 A093425 * A075399 A079840 A231278
KEYWORD
nonn
AUTHOR
Benoit Cloitre, Mar 03 2004
EXTENSIONS
Definition corrected by M. F. Hasler, Apr 10 2026
STATUS
approved