The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A306886 Number of distinct nonzero values taken by (x1-x2)^2 + (y1-y2)^2 for x1, y1, x2, y2 integers with 0 <= (x1,y1) <= n and -n <= (x2,y2) <= 0. 0
 0, 5, 14, 26, 41, 60, 82, 105, 134, 164, 197, 234, 272, 314, 359, 407, 456, 507, 566, 623, 686, 748, 812, 883, 956, 1030, 1107, 1181, 1267, 1354, 1445, 1529, 1620, 1721, 1814, 1920, 2022, 2121, 2232, 2344, 2460, 2573, 2691, 2815, 2936, 3061, 3189, 3321, 3462 (list; graph; refs; listen; history; text; internal format)
 OFFSET 0,2 COMMENTS In the x-y plane, lengths of line segments between lattice points P1=(x1,y1) with 0 <= (x1,y1) <= n and lattice points P2=(x2,y2) with -n <= (x2,y2) <= 0. LINKS EXAMPLE For n=1, distances P1 to P2 can take 5 distinct nonzero values, whose squared distances are {1,2,4,5,8}, so a(1)=5. MAPLE segments := proc (n)   local rr, x1, y1, x2, y2, sqDist;   rr := {};   for x1 from 0 to n do for y1 from 0 to n do     for x2 from 0 by -1 to -n do for y2 from 0 by -1 to -n do       sqDist := (x1-x2)^2+(y1-y2)^2;       if 0 < sqDist then rr := {op(rr), sqDist} end if;     end do end do   end do end do;   return rr end proc: qq:=[seq(nops(segments(n)), n=0..20)] CROSSREFS Sequence in context: A332623 A070133 A246517 * A202821 A301689 A066479 Adjacent sequences:  A306883 A306884 A306885 * A306887 A306888 A306889 KEYWORD nonn AUTHOR César Eliud Lozada, Mar 15 2019 EXTENSIONS a(31)-a(48) from Jon E. Schoenfield, Apr 03 2019 STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified June 22 20:16 EDT 2021. Contains 345388 sequences. (Running on oeis4.)