OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..1000 (first 200 terms from T. D. Noe)
MAPLE
f:=proc(n) local i, j, k, t1, t2; t1:={}; for i from 1 to n do for j from i to n do for k from j to n do t1:={op(t1), i*j*k}; od: od: od: t1:=convert(t1, list); nops(t1); end;
MATHEMATICA
a[n_] := Reap[Do[Sow[i*j*k], {i, 1, n}, {j, i, n}, {k, j, n}]][[2, 1]] // Union // Length; Table[a[n], {n, 1, 50}] (* Jean-François Alcover, Jan 30 2018 *)
PROG
(Haskell)
import Data.List (nub)
a027425 n = length $ nub [i*j*k | i <- [1..n], j <- [1..n], k <- [1..n]]
-- Reinhard Zumkeller, Jan 01 2012
(PARI) pr(n)=my(v=List()); for(i=1, n, for(j=i, n, listput(v, i*j))); Set(v)
a(n)=my(v=pr(n), u=v); for(i=2, n, u=Set(concat(u, v*i))); #u \\ Charles R Greathouse IV, Mar 04 2014
(Python)
def A027425(n): return len({i*j*k for i in range(1, n+1) for j in range(1, i+1) for k in range(1, j+1)}) # Chai Wah Wu, Oct 16 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
STATUS
approved