OFFSET
1,10
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
Wikipedia, Run (cards)
EXAMPLE
The divisors of 90 have runs: {{1, 2, 3}, {5, 6}, {9, 10}, {15}, {18}, {30}, {45}, {90}}, so a(45) = 3.
MAPLE
f:= proc(n) local D, B, R;
D:= sort(convert(numtheory:-divisors(2*n), list));
B:= D[2..-1]-D[1..-2];
R:= select(j -> (j=1 or B[j-1]>1) and B[j]=1, [$1..nops(B)]);
nops(R);
end proc:
map(f, [$1..100]); # Robert Israel, Oct 25 2019
MATHEMATICA
Table[Length[DeleteCases[Length/@Split[Divisors[2*n], #2==#1+1&], 1]], {n, 100}]
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Oct 18 2019
STATUS
approved