|
|
|
|
0, 4, 8, 16, 24, 40, 48, 72, 88, 112, 128, 168, 184, 232, 256, 288, 320, 384, 408, 480, 512, 560, 600, 688, 720, 800, 848, 920, 968, 1080, 1112, 1232, 1296, 1376, 1440, 1536, 1584, 1728, 1800, 1896, 1960, 2120, 2168, 2336, 2416, 2512, 2600, 2784, 2848, 3016, 3096
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,2
|
|
COMMENTS
|
Number of distinct slopes in an n X n grid.
|
|
LINKS
|
|
|
PROG
|
(Python)
from functools import lru_cache
@lru_cache(maxsize=None)
if n == 0:
return 0
c, j = 0, 2
k1 = n//j
while k1 > 1:
j2 = n//k1 + 1
j, k1 = j2, n//j2
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|