Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A328457
Length of the longest run of divisors > 1 of n.
10
0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 5, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1
OFFSET
1,6
LINKS
MATHEMATICA
Table[If[n==1, 0, Max@@Length/@Split[Rest[Divisors[n]], #2==#1+1&]], {n, 100}]
PROG
(PARI) A328457(n) = { my(rl=0, pd=0, m=0); fordiv(n, d, if(d>1, if(d>(1+pd), m = max(m, rl); rl=0); pd=d; rl++)); max(m, rl); }; \\ Antti Karttunen, Feb 23 2023
CROSSREFS
Records occur at A328448.
Positions of 0's and 1's are A088725.
The version that looks at all divisors (including 1) is A055874.
The number of successive pairs of divisors > 1 of n is A088722(n).
The Heinz number of the multiset of run-lengths of divisors of n is A328166(n).
The longest run of nontrivial divisors of n is A328458(n).
Sequence in context: A069283 A319430 A285337 * A340827 A360119 A033630
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 16 2019
EXTENSIONS
Data section extended up to a(105) by Antti Karttunen, Feb 23 2023
STATUS
approved