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!)
A373716 a(n) is the number of distinct products i*j minus the number of distinct sums i+j with 1 <= i, j <= n. 1
0, 0, 1, 2, 5, 7, 12, 15, 19, 23, 32, 36, 47, 53, 60, 66, 81, 88, 105, 113, 123, 133, 154, 162, 176, 188, 201, 212, 239, 249, 278, 291, 307, 323, 341, 352, 387, 405, 424, 438, 477, 492, 533, 551, 570, 592, 637, 652, 681, 701, 726, 747, 798, 818, 847, 867, 895 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,4
LINKS
FORMULA
a(n) = A027424(n) - A005408(n-1).
a(n) = (n-1)^2 - A062851(n).
EXAMPLE
a(5) = 5 because:
Products: Sums:
* | 1 | 2 | 3 | 4 | 5 + | 1 | 2 | 3 | 4 | 5
------------------------- -----------------------
1 | 1 | 2 | 3 | 4 | 5 1 | 2 | 3 | 4 | 5 | 6
2 | 2 | 4 | 6 | 8 | 10 2 | 3 | 4 | 5 | 6 | 7
3 | 3 | 6 | 9 | 12 | 15 3 | 4 | 5 | 6 | 7 | 8
4 | 4 | 8 | 12 | 16 | 20 4 | 5 | 6 | 7 | 8 | 9
5 | 5 | 10 | 15 | 20 | 25 5 | 6 | 7 | 8 | 9 | 10
The number of distinct products [1,2,3,4,5,6,8,9,10,12,15,16,20,25] is 14.
The number of distinct sums [2,3,4,5,6,7,8,9,10] is 9.
So a(5) = 14 - 9 = 5.
PROG
(Python)
A027424 = lambda n: len({i*j for i in range(1, n+1) for j in range(1, i+1)})
a = lambda n: A027424(n)-((n<<1)-1)
print([a(n) for n in range(1, 58)])
(PARI) a(n) = #setbinop((x, y)->x*y, vector(n, i, i)) - 2*n + 1; \\ Michel Marcus, Jun 23 2024
CROSSREFS
Sequence in context: A294146 A022758 A349744 * A129232 A088822 A080182
KEYWORD
nonn
AUTHOR
Darío Clavijo, Jun 22 2024
STATUS
approved

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 August 25 22:58 EDT 2024. Contains 375454 sequences. (Running on oeis4.)