OFFSET
0,3
LINKS
T. D. Noe, Table of n, a(n) for n = 0..1000
MAPLE
A027427 := proc(n)
local L, i, j ;
L := {};
for i from 0 to n do
for j from i+1 to n do
L := L union {i*j};
end do:
end do:
nops(L);
end proc: # R. J. Mathar, Jun 09 2016
MATHEMATICA
a[n_] := Table[i*j, {i, 0, n}, {j, i+1, n}] // Flatten // Union // Length;
Table[a[n], {n, 0, 60}] (* Jean-François Alcover, Feb 03 2018 *)
PROG
(Haskell)
import Data.List (nub)
a027427 n = length $ nub [i*j | j <- [1..n], i <- [0..j-1]]
-- Reinhard Zumkeller, Jan 01 2012
(Python)
def A027427(n): return 1+len({i*j for i in range(1, n+1) for j in range(1, i)}) if n else 0 # Chai Wah Wu, Oct 13 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved