A345447 Numbers of the form i+j+2*i*j and 2+i+j+2*i*j for i,j >= 1.
4, 6, 7, 9, 10, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 54, 55, 57, 58, 59, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80
Offset: 1
Keywords
Examples
For i,j = 1, 1+1+2*1*1 = 4 and 2+1+1+2*1*1 = 6.
Links
- Wikipedia, Sieve of Sundaram.
Programs
-
Python
def aupto(limit): aset = set() for i in range(1, limit//3): for j in range(i, limit//3): t = i + j + 2*i*j if t > limit: break aset.update([t, t+2]) return sorted(an for an in aset if an <= limit) print(aupto(80)) # Michael S. Branicky, Jul 05 2021
Comments