A334454 Number of distinct composite numbers in the n X n multiplication table.
0, 1, 3, 6, 10, 14, 20, 25, 31, 37, 47, 53, 65, 73, 82, 90, 106, 115, 133, 143, 155, 167, 189, 199, 215, 229, 244, 257, 285, 297, 327, 342, 360, 378, 398, 411, 447, 467, 488, 504, 544, 561, 603, 623, 644, 668, 714, 731, 762, 784, 811, 834, 886
Offset: 1
Keywords
Examples
There are a(7) = 20 distinct composite numbers in the 7x7 multiplication table: 1 2 3 4 5 6 7 4* 6* 8* 10* 12 14* 9* 12* 15* 18* 21* 16* 20* 24* 28* 25* 30* 35* 36* 42* 49*
Programs
-
Maple
A334454 := proc(n) local dcom,i,j; dcom := {} ; for i from 1 to n do for j from 1 to i do if not isprime(i*j) and i*j> 1 then dcom := dcom union {i*j} ; end if; end do: end do: print(n,dcom) ; nops(dcom) ; end proc: seq(A334454(n),n=1..70) ; # R. J. Mathar, Oct 02 2020
-
Python
def A334454(n): return len({i*j for i in range(2,n+1) for j in range(2,i+1)}) # Chai Wah Wu, Oct 14 2023
Comments