login
A027427
Number of distinct products ij with 0 <= i < j <= n.
4
0, 1, 2, 4, 7, 11, 14, 20, 25, 32, 37, 47, 52, 64, 71, 79, 88, 104, 112, 130, 140, 151, 162, 184, 193, 211, 224, 240, 253, 281, 292, 322, 338, 355, 372, 391, 404, 440, 459, 479, 494, 534, 550, 592, 612, 632, 655, 701, 718, 753, 775, 801, 824, 876
OFFSET
0,3
FORMULA
a(n) = A027428(n)+1. - T. D. Noe, Jan 16 2007
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
Cf. A027430, etc.
Sequence in context: A054850 A225154 A167805 * A306070 A262136 A330822
KEYWORD
nonn
AUTHOR
STATUS
approved