A133829 a(n) = the largest "non-isolated divisor" of 2n. A positive divisor k of n is non-isolated if k-1 or k+1 also divides n.
2, 2, 3, 2, 2, 4, 2, 2, 3, 5, 2, 4, 2, 2, 6, 2, 2, 4, 2, 5, 7, 2, 2, 4, 2, 2, 3, 8, 2, 6, 2, 2, 3, 2, 2, 9, 2, 2, 3, 5, 2, 7, 2, 2, 10, 2, 2, 4, 2, 5, 3, 2, 2, 4, 11, 8, 3, 2, 2, 6, 2, 2, 7, 2, 2, 12, 2, 2, 3, 5, 2, 9, 2, 2, 6, 2, 2, 13, 2, 5, 3, 2, 2, 8, 2, 2, 3, 2, 2, 10, 14, 2, 3, 2, 2, 4, 2, 2, 3
Offset: 1
Keywords
Links
- Antti Karttunen, Table of n, a(n) for n = 1..20000
Programs
-
Maple
A133829 := proc(n) local divs,k,i ; divs := sort(convert(numtheory[divisors](2*n),list)) ; for i from 1 to nops(divs) do k := op(-i,divs) ; if k-1 in divs or k+1 in divs then RETURN(k) ; fi ; od: RETURN(0) ; end: seq(A133829(n),n=1..100) ; # R. J. Mathar, Oct 19 2007
-
PARI
A133829(n) = { n = 2*n; my(m=0); fordiv(n,d,if(!(n%(1+d)) || ((d>1) && !(n%(d-1))), m = max(m,d))); (m); }; \\ Antti Karttunen, Mar 02 2023
Extensions
More terms from R. J. Mathar, Oct 19 2007
Comments