A328195 Maximum length of a divisibility chain of consecutive divisors of n greater than 1.
0, 1, 1, 2, 1, 2, 1, 3, 2, 2, 1, 2, 1, 2, 2, 4, 1, 2, 1, 3, 2, 2, 1, 2, 2, 2, 3, 3, 1, 2, 1, 5, 2, 2, 2, 2, 1, 2, 2, 3, 1, 2, 1, 3, 2, 2, 1, 2, 2, 2, 2, 3, 1, 2, 2, 3, 2, 2, 1, 2, 1, 2, 2, 6, 2, 2, 1, 3, 2, 2, 1, 2, 1, 2, 2, 3, 2, 2, 1, 3, 4, 2, 1, 2, 2, 2, 2, 4, 1, 2, 2, 3, 2, 2, 2, 2, 1, 2, 3, 3, 1, 2, 1, 4, 2
Offset: 1
Keywords
Examples
The divisors of 272 greater than 1 are {2, 4, 8, 16, 17, 34, 68, 136, 272}, with divisibility chains {{2, 4, 8, 16}, {17, 34, 68, 136, 272}}, so a(272) = 5.
Links
- Antti Karttunen, Table of n, a(n) for n = 1..65537
Crossrefs
Programs
-
Mathematica
Table[If[n==1,0,Max@@Length/@Split[DeleteCases[Divisors[n],1],Divisible[#2,#1]&]],{n,100}]
-
PARI
A328195(n) = if(1==n, 0, my(divs=divisors(n), rl=0,ml=1); for(i=2,#divs,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