login
Number of distinct products i*j*k*l for 1 <= i <= j <= k <= l <= n.
5

%I #12 Apr 07 2017 10:40:05

%S 1,5,15,25,55,75,140,175,225,275,448,504,770,882,1022,1134,1626,1782,

%T 2460,2670,2970,3270,4345,4565,5135,5585,6100,6505,8338,8679,10927,

%U 11525,12393,13261,14345,14787,18187,19344,20618,21346,25823,26698

%N Number of distinct products i*j*k*l for 1 <= i <= j <= k <= l <= n.

%H Seiichi Manyama, <a href="/A100437/b100437.txt">Table of n, a(n) for n = 1..200</a>

%p f:=proc(n) local i,j,k,l,t1; t1:={}; for i from 1 to n do for j from i to n do for k from j to n do for l from k to n do t1:={op(t1),i*j*k*l}; od: od: od: od: t1:=convert(t1,list); nops(t1); end;

%t f[n_] := Length[ Union[ Flatten[ Table[ i*j*k*l, {i, n}, {j, i, n}, {k, j, n}, {l, k, n}] ]]]; Table[ f[n], {n, 45}] (* _Robert G. Wilson v_, Dec 14 2004 *)

%o (PARI) pr(n)=my(v=List());for(i=1,n, for(j=i,n, listput(v, i*j))); Set(v)

%o a(n)=my(u=List(),v=pr(n)); for(i=1,#v,for(j=i,#v,listput(u,v[i]*v[j]))); #Set(u) \\ _Charles R Greathouse IV_, Mar 04 2014

%Y Cf. A027425, A027430, A100435, A100436, A100438.

%K nonn

%O 1,2

%A _N. J. A. Sloane_, Nov 21 2004

%E More terms from _Robert G. Wilson v_, Dec 14 2004