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

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A106602 Number of primitive positive solutions to 8n+2=x^2+y^2. 2
1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 1, 2, 0, 1, 0, 0, 2, 1, 0, 1, 1, 0, 1, 1, 0, 0, 1, 0, 0, 1, 0, 2, 1, 0, 1, 0, 0, 1, 1, 0, 1, 2, 0, 1, 1, 0, 2, 0, 0, 0, 2, 0, 1, 1, 0, 1, 0, 0, 0, 1, 0, 2, 1, 0, 1, 1, 0, 1, 1, 0 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,17

LINKS

R. J. Mathar, Table of n, a(n) for n = 0..1000

EXAMPLE

a(16)=2 because we have 130=11^2+3^2=9^2+7^2. a(2)=0 because although 18=3^2+3^2, these components are not mutually prime.

MAPLE

A106602 := proc(n)

    local a, x, y, fourn;

    fourn := 8*n+2 ;

    a := 0 ;

    for x from 1 do

        if x^2 >= fourn then

            return a;

        else

            y := fourn-x^2 ;

            if issqr(y) then

                y := sqrt(y) ;

                if y <= x and igcd(x, y) = 1 then

                    a := a+1 ;

                end if;

            end if;

        end if:

    end do:

end proc: # R. J. Mathar, Sep 21 2013

CROSSREFS

Cf. A106594.

Sequence in context: A104451 A285680 A240668 * A106594 A143251 A115235

Adjacent sequences:  A106599 A106600 A106601 * A106603 A106604 A106605

KEYWORD

easy,nonn

AUTHOR

Colin Mallows, May 10 2005

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.

License Agreements, Terms of Use, Privacy Policy. .

Last modified February 28 11:08 EST 2020. Contains 332323 sequences. (Running on oeis4.)