C with minor modifications this program is used to produce C A071339-A071347 (adjust Rmax, activate C3D, C4D lines) IMPLICIT INTEGER (A-Z) PARAMETER (Rmax=500,RM2=Rmax*Rmax) C Multiplicity counts INTEGER C(RM2) DO 30 R = 0, Rmax DO 40 N = 0, R*R C(N) = 0 40 CONTINUE DO 10 I = -R, R I2=I*I DO 10 J = -R, R J2=J*J C Activate lines with 3D for sequences A071342-A071344 C Activate lines with 4D for sequences A071345-A071347 C3D4D DO 10 K = -R, R C3D4D K2=K*K C4D DO 10 L = -R, R C4D L2=L*L N=I2+J2 C3D N=I2+J2+K2 C4D N=I2+J2+K2+L2 IF ( N .LE. R*R ) C(N)=C(N)+1 10 CONTINUE C Search maximum in list C of counts A = 0 DO 20 N = 0, R*R IF ( C(N) .GT. A ) THEN C Entries for sequence A071339 (maximum count) A = C(N) C Entries for sequence A071340 (first ocurrence) NMIN = N ENDIF C Entries for sequence A071341 (last ocurrence) C The "GE" (>=)in the comparison C is the only difference from A071340 IF ( C(N) .GE. A ) NMAX = N 20 CONTINUE C n, A071339, A071340, A071341 C3D n, A071342, A071343, A071344 C4D n, A071345, A071346, A071347 WRITE (*,*) R, A, NMIN, NMAX 30 CONTINUE END 