Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)

Revision History for A000161

(Underlined text is an addition; strikethrough text is a deletion.)

Showing entries 1-10 | older changes
A000161 Number of partitions of n into 2 squares.
(history; published version)
#85 by Michel Marcus at Fri Sep 09 02:33:47 EDT 2022
STATUS

reviewed

approved

#84 by Joerg Arndt at Fri Sep 09 01:42:59 EDT 2022
STATUS

proposed

reviewed

#83 by Chai Wah Wu at Thu Sep 08 23:23:11 EDT 2022
STATUS

editing

proposed

#82 by Chai Wah Wu at Thu Sep 08 23:22:42 EDT 2022
PROG

from math import prod

from sympy.solvers.diophantine.diophantine import diop_DNfactorint

def A000161(n):

f = factorint(n)

def return int(not A000161any(n): returne&1 for e in lenf.values())) + (((m:=prod(diop_DN(-1 if p==2 else (e+1 if p&3==1 else (e+1)&1, ) for p, e in f.items()))+((((~n & n))>>-1).bit_length()&1)<<1)-1 if m&1 else 0))>>1) if n else 1 # Chai Wah Wu, Sep 08 2022

#81 by Chai Wah Wu at Thu Sep 08 23:12:19 EDT 2022
PROG

(Python)

from sympy.solvers.diophantine.diophantine import diop_DN

def A000161(n): return len(diop_DN(-1, n))>>1 if n else 1 # Chai Wah Wu, Sep 08 2022

STATUS

approved

editing

#80 by Alois P. Heinz at Tue Apr 12 08:19:56 EDT 2022
STATUS

proposed

approved

#79 by Bernard Schott at Tue Apr 12 07:22:45 EDT 2022
STATUS

editing

proposed

#78 by Bernard Schott at Tue Apr 12 07:21:48 EDT 2022
FORMULA

a(n) = 0 iff n is in A022544. - Bernard Schott, Apr 12 2022

STATUS

proposed

editing

Discussion
Tue Apr 12 07:22
Bernard Schott: Deleted, was in comment, sorry.
#77 by Bernard Schott at Tue Apr 12 07:21:02 EDT 2022
STATUS

editing

proposed

#76 by Bernard Schott at Tue Apr 12 07:20:26 EDT 2022
FORMULA

a(n) = 0 iff n is in A022544. - Bernard Schott, Apr 12 2022

STATUS

proposed

editing

Discussion
Tue Apr 12 07:20
Bernard Schott: Put iff for a(n) = 0.

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 6 12:02 EDT 2024. Contains 374974 sequences. (Running on oeis4.)