login
A394915
Consider the following process: at step n, draw the line passing through the points (n, prime(n)) and (n+1, prime(n+1)). a(n) gives the total number of distinct single-point line intersections after step n.
3
0, 1, 1, 3, 5, 8, 11, 15, 22, 25, 31, 31, 37, 37, 46, 46, 51, 59, 59, 67, 76, 76, 87, 104, 115, 125, 137, 150, 165, 186, 202, 219, 234, 259, 275, 292, 292, 315, 334, 334, 355, 387, 407, 432, 451, 488, 488, 511, 532, 560, 584, 609, 646, 646, 646, 646, 672, 698, 725, 755, 796, 844
OFFSET
1,4
MATHEMATICA
A394915list[nmax_] := Module[{lines = MapIndexed[{#2[[1]], #} &, Partition[Prime[Range[nmax+1]], 2, 1]], pts = {}, int}, int[{x1_, {y1_, y2_}}, {x3_, {y3_, y4_}}] := If[# == 0, Nothing, With[{a = x3*y4 - y3*(x3 + 1), b = x1*y2 - y1*(x1 + 1)}, {(a - b)/#, (b*(y3 - y4) - a*(y1 - y2))/#}]] & [y1 - y2 - y3 + y4]; Table[Length[pts = DeleteDuplicates[Join[pts, Map[int[#, lines[[n]]] &, lines[[;; n-1]]]]]], {n, nmax}]];
A394915list[100]
CROSSREFS
Partial sums of A394225.
Sequence in context: A228848 A049706 A080415 * A340318 A175489 A289244
KEYWORD
nonn
AUTHOR
Paolo Xausa, Apr 09 2026
STATUS
approved