login
Number of increasing geometric progressions ending in n (in the positive integers), including those of length 1 or 2.
2

%I #9 Nov 19 2017 19:02:39

%S 1,2,3,5,5,6,7,10,11,10,11,13,13,14,15,21,17,20,19,21,21,22,23,26,29,

%T 26,31,29,29,30,31,38,33,34,35,41,37,38,39,42,41,42,43,45,47,46,47,53,

%U 55,54,51,53,53,58,55,58,57,58,59,61,61,62,65,77,65,66,67,69,69,70,71

%N Number of increasing geometric progressions ending in n (in the positive integers), including those of length 1 or 2.

%H Antti Karttunen, <a href="/A058189/b058189.txt">Table of n, a(n) for n = 1..16384</a>

%F a(n) = A058190(n) + n.

%e a(4) = 5 since the possibilities are (4), (1,4), (2,4), (3,4) and (1,2,4).

%o (PARI)

%o ends_max_progression_of_length(n,ratio) = { my(k=1); while(1,if(denominator(n)>1,return(k)); n *= ratio; k++;) };

%o A058190(n) = sum(d=1,(n-1),max(0,ends_max_progression_of_length(d,d/n)-2));

%o A058189(n) = (A058190(n)+n); \\ _Antti Karttunen_, Nov 19 2017

%Y Cf. A054519 for arithmetic progressions.

%Y Cf. A058190.

%K nonn

%O 1,2

%A _Henry Bottomley_, Nov 22 2000