OFFSET
1,2
COMMENTS
LINKS
Kival Ngaokrajang, Illustration of initial terms
Eric Weisstein's World of Mathematics, Circle-Circle Intersection
PROG
(Small Basic)
For n=1 to 200
count=0
row=math.Ceiling((n+1)/2)-1
for i=0 To row
for j=0 To row
x=math.power(4*i*i+4*j*j, 1/2)
c1=-x+1-n
c2=-x-1+n
c3=-x+1+n
c4=x+1+n
If x>0 and c1*c2*c3*c4>0 then
c=(1/x)*math.Power(c1*c2*c3*c4, 1/2)
Else
c=0
EndIf
If c>0 Then
count=count+1
EndIf
EndFor
EndFor
If Math.Remainder(n, 2)=0 Then
circle=4*(count-2)+4
Else
circle=4*count
EndIf
TextWindow.Writeline(circle)
EndFor
CROSSREFS
KEYWORD
nonn
AUTHOR
Kival Ngaokrajang, Jun 22 2014
EXTENSIONS
Name specified. - Wolfdieter Lang, Jul 07 2014
STATUS
approved