OFFSET
1,3
LINKS
Branden Aldridge, Table of n, a(n) for n = 1..20000 (terms 1..1000 from T. D. Noe).
MAPLE
f:=proc(n) local i, j, t1, t2; t1:={}; for i from 1 to n-1 do for j from i+1 to n do t1:={op(t1), i*j}; od: od: t1:=convert(t1, list); nops(t1); end;
MATHEMATICA
a[n_] := Table[i*j, {i, 1, n-1}, {j, i+1, n}] // Flatten // Union // Length; Table[ a[n] , {n, 1, 53}] (* Jean-François Alcover, Jan 31 2013 *)
PROG
(Haskell)
import Data.List (nub)
a027428 n = length $ nub [i*j | j <- [2..n], i <- [1..j-1]]
-- Reinhard Zumkeller, Jan 01 2012
(Python)
def A027428(n): return len({i*j for i in range(1, n+1) for j in range(1, i)}) # Chai Wah Wu, Oct 13 2023
CROSSREFS
KEYWORD
nonn,easy,nice
AUTHOR
STATUS
approved