OFFSET
1,8
LINKS
Antti Karttunen, Table of n, a(n) for n = 1..16384
FORMULA
a(n) = A058189(n) - n.
EXAMPLE
a(16) = 5 since the possibilities are (1,4,16), (1,2,4,8,16), (2,4,8,16), (4,8,16), (9,12,16).
PROG
(PARI)
ends_max_progression_of_length(n, ratio) = { my(k=1); while(1, if(denominator(n)>1, return(k)); n *= ratio; k++; ) };
A058190(n) = sum(d=1, (n-1), max(0, ends_max_progression_of_length(d, d/n)-2)); \\ Antti Karttunen, Nov 19 2017
CROSSREFS
KEYWORD
nonn
AUTHOR
Henry Bottomley, Nov 22 2000
STATUS
approved