A328194 Maximum length of a divisibility chain of consecutive nontrivial divisors of n (greater than 1 and less than n).
0, 0, 0, 1, 0, 1, 0, 2, 1, 1, 0, 1, 0, 1, 1, 3, 0, 2, 0, 2, 1, 1, 0, 1, 1, 1, 2, 2, 0, 1, 0, 4, 1, 1, 1, 1, 0, 1, 1, 2, 0, 2, 0, 2, 1, 1, 0, 1, 1, 2, 1, 2, 0, 2, 1, 2, 1, 1, 0, 1, 0, 1, 1, 5, 1, 2, 0, 2, 1, 1, 0, 1, 0, 1, 2, 2, 1, 2, 0, 2, 3, 1, 0, 1, 1, 1, 1, 3, 0, 1, 1, 2, 1, 1, 1, 1, 0, 2, 2, 3, 0, 2, 0, 3, 1
Offset: 1
Keywords
Examples
The nontrivial divisors of 272 are {2, 4, 8, 16, 17, 34, 68, 136} with divisibility chains {{2, 4, 8, 16}, {17, 34, 68, 136}}, so a(272) = 4.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Crossrefs
Programs
-
Mathematica
Table[Switch[n,1,0,?PrimeQ,0,,Max@@Length/@Split[DeleteCases[Divisors[n],1|n],Divisible[#2,#1]&]],{n,100}]
-
PARI
A328194(n) = if(1==n || isprime(n), 0, my(divs=divisors(n), rl=0,ml=1); for(i=2,#divs-1,if(!(divs[i]%divs[i-1]), rl++, ml = max(rl,ml); rl=1)); max(ml,rl)); \\ Antti Karttunen, Dec 07 2024
Extensions
Data section extended up to a(105) by Antti Karttunen, Dec 07 2024
Comments