A057918 Number of pairs of numbers (r,s) each less than n such that (r,s,n) is in geometric progression.
0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 1, 0, 0, 0, 3, 0, 2, 0, 1, 0, 0, 0, 1, 4, 0, 2, 1, 0, 0, 0, 3, 0, 0, 0, 5, 0, 0, 0, 1, 0, 0, 0, 1, 2, 0, 0, 3, 6, 4, 0, 1, 0, 2, 0, 1, 0, 0, 0, 1, 0, 0, 2, 7, 0, 0, 0, 1, 0, 0, 0, 5, 0, 0, 4, 1, 0, 0, 0, 3, 8, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 3, 0, 6, 2, 9, 0, 0, 0, 1, 0
Offset: 1
Examples
a(72)=5 since (2,12,72), (8,24,72), (18,36,72), (32,48,72), (50,60,72) are the possible three term geometric progressions.
Links
- Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Programs
-
Haskell
a057918 n = sum $ map ((0 ^) . (`mod` n) . (^ 2)) [1..n-1] -- Reinhard Zumkeller, Mar 27 2012
Comments