login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A100440 Number of distinct values of i*j + j*k + k*i with 1 <= i <= j <= k <= n. 7

%I #25 Mar 23 2021 15:50:53

%S 1,4,10,20,33,50,68,93,123,154,193,233,276,325,377,434,500,568,643,

%T 720,804,885,979,1068,1168,1274,1381,1495,1615,1746,1876,2005,2148,

%U 2285,2437,2596,2748,2908,3077,3241,3425,3608,3796,3979,4181,4388,4585,4804,5015,5237

%N Number of distinct values of i*j + j*k + k*i with 1 <= i <= j <= k <= n.

%C a(n) <= A000292(n); a(n) = number of terms in n-th row of the triangle in A200741. - _Reinhard Zumkeller_, Nov 21 2011

%H David A. Corneth, <a href="/A100440/b100440.txt">Table of n, a(n) for n = 1..3000</a>

%p f:=proc(n) local i,j,k,t1; 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+j*k+k*i}; od: od: od: t1:=convert(t1,list); nops(t1); end;

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

%o (Haskell)

%o a100440 = length . a200741_row -- _Reinhard Zumkeller_, Nov 21 2011

%o (PARI) first(n) = {my(v = vector(3*n^2, i, oo), res = vector(n)); forvec(x = vector(3, i, [1,n]), c = x[1]*x[2] + x[1]*x[3] + x[2]*x[3]; v[c] = min(x[3],v[c]); , 1); for(i = 1, #v, if(v[i] < oo, res[v[i]]++)); for(i = 2, #res, res[i] += res[i-1]); res } \\ _David A. Corneth_, Mar 23 2021

%o (Python)

%o from numba import njit

%o @njit()

%o def aupton(terms):

%o aset, alst = set(), []

%o for n in range(1, terms+1):

%o for i in range(1, n+1):

%o for j in range(i, n+1):

%o aset.add(i*j + j*n + n*i)

%o alst.append(len(aset))

%o return alst

%o print(aupton(50)) # _Michael S. Branicky_, Mar 23 2021

%Y Cf. A027430, A100439, A102533, A102534, A200737.

%K nonn

%O 1,2

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

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

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 23 09:22 EDT 2024. Contains 371905 sequences. (Running on oeis4.)