cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A225253 Number of distinct values of the sum of 2 products of two 0..n integers.

This page as a plain text file.
%I A225253 #34 Jan 15 2025 19:38:01
%S A225253 1,3,8,16,27,42,59,81,105,134,167,203,241,285,331,381,436,495,556,622,
%T A225253 690,764,841,920,1002,1091,1184,1279,1378,1482,1588,1700,1813,1932,
%U A225253 2053,2177,2308,2443,2579,2719,2862,3012,3164,3322,3481,3645,3814,3985,4158,4339
%N A225253 Number of distinct values of the sum of 2 products of two 0..n integers.
%H A225253 David A. Corneth, <a href="/A225253/b225253.txt">Table of n, a(n) for n = 0..3000</a> (first 999 terms from R. H. Hardin)
%H A225253 David A. Corneth, <a href="/A225253/a225253.gp.txt">PARI program</a>
%e A225253 a(3) = 16 as the possible products i*j where 0 <= i, j <= 3 are 0, 1, 2, 3, 4, 6, 9. From these numbers we can find the 16 distinct sums, listed with a few examples, 0, 1, 2, 3, 4, 5, 6, 7 = 3+4, 8, 9, 10, 11, 12 = 6+6, 13 = 4+9, 15, 18. - _David A. Corneth_, Sep 07 2023
%o A225253 (PARI) a(n) = #setbinop((x,y)->x+y, setbinop((x,y)->x*y, [0..n])); \\ _Michel Marcus_, Sep 06 2023
%o A225253 (PARI) \\ See PARI link. _David A. Corneth_, Sep 07 2023
%o A225253 (Python)
%o A225253 from itertools import combinations_with_replacement
%o A225253 def A225253(n): return len({x+y for x,y in combinations_with_replacement({i*j for i in range(n+1) for j in range(i+1)},2)}) # _Chai Wah Wu_, Oct 13 2023
%Y A225253 Row 2 of A225252.
%Y A225253 Cf. A027384, A062854, A225254.
%K A225253 nonn
%O A225253 0,2
%A A225253 _R. H. Hardin_, May 04 2013
%E A225253 a(0)=1 prepended by _Alois P. Heinz_, Oct 13 2023