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.
%I A370759 #40 Mar 26 2024 13:19:18 %S A370759 4,7,10,11,13,15,16,19,20,22,23,25,27,28,30,31,34,35,37,39,40,43,44, %T A370759 45,46,47,49,50,51,52,55,58,59,60,61,63,64,65,67,70,71,72,73,75,76,79, %U A370759 80,82,83,85,86,87,88,90,91,93,94,95,97,99,100,103,105,106,107,109,110,111,112 %N A370759 Numbers expressible in the form k*m + 2*(k+m) - 1, for positive k and m. %C A370759 All such numbers are answers to the question: How many plane regions result from partitioning by two sets of straight lines, such that: %C A370759 Each of the k straight lines of the first bundle passes though a single point A, and intersects each of the m straight lines of the second bundle each of which passes through a different point B. There are no straight lines belonging to both bundles, i.e. the line AB is not involved. %C A370759 Because k*m+2*(k+m)-1 = (k+2)*(m+2)-5, and k and m are both positive, a(n) = A264828(n+2) - 5. - _Kevin Ryde_, Mar 26 2024 %H A370759 Nicolay Avilov, <a href="/A370759/a370759.jpg">Explanatory drawing</a>. %H A370759 Nicolay Avilov, <a href="/A370759/a370759_1.jpg">Illustration for terms a(1) - a(6)</a>. %F A370759 If there are k straight lines in the first bundle and m straight lines in the second bundle, then we get k*m + 2*(k + m) - 1 regions. %e A370759 4 is a term: if each bundle consists of one straight line, the plane is divided into 4 regions. %e A370759 7 is a term: if the first bundle consists of one line and the second consists of two lines, the plane is divided into 7 regions. %e A370759 These and other examples are illustrated in the linked figures. %o A370759 (PARI) print(Vec(setbinop((k,m)->k*m + 2*(k + m) - 1, [1..112]), 69)) \\ _Michel Marcus_, Mar 02 2024 %o A370759 (Python) %o A370759 maxval = 112 %o A370759 av = [[k*m+2*k+2*m-1 for k in range(1,maxval)] for m in range(1,maxval)] %o A370759 flat = [n for row in av for n in row] %o A370759 uniq = list(set(flat)) %o A370759 a370759 = list(filter(lambda x: x<=maxval, uniq)) %o A370759 print(a370759) %o A370759 # _Robert Munafo_, Mar 25 2024 %o A370759 (Python) %o A370759 from itertools import count, islice %o A370759 from sympy import isprime %o A370759 def A370759_gen(startvalue=4): # generator of terms >= startvalue %o A370759 return filter(lambda n:not (isprime(n+5) or (n&1 and isprime((n>>1)+3))),count(max(startvalue,4))) %o A370759 A370759_list = list(islice(A370759_gen(),20)) # _Chai Wah Wu_, Mar 26 2024 %Y A370759 Cf. A264828, A028875 (case when k=m). %K A370759 nonn %O A370759 1,1 %A A370759 _Nicolay Avilov_, Mar 01 2024