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!)
A084888 Number of partitions of n^3 into two squares>0. 6

%I #21 May 17 2023 10:14:38

%S 0,0,1,0,0,2,0,0,1,0,2,0,0,2,0,0,0,2,1,0,2,0,0,0,0,3,2,0,0,2,0,0,1,0,

%T 2,0,0,2,0,0,2,2,0,0,0,2,0,0,0,0,4,0,2,2,0,0,0,0,2,0,0,2,0,0,0,8,0,0,

%U 2,0,0,0,1,2,2,0,0,0,0,0,2,0,2,0,0,8,0,0,0,2,2,0,0,0,0,0,0,2,1,0,3,2

%N Number of partitions of n^3 into two squares>0.

%C a(A050804(n)) = 1.

%H Reinhard Zumkeller, <a href="/A084888/b084888.txt">Table of n, a(n) for n = 0..1000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/DiophantineEquation2ndPowers.html">Diophantine Equation: 2nd Powers</a>.

%H Reinhard Zumkeller, <a href="/A084888/a084888.txt">Illustration for A084888 and A000404</a>

%F a(n) = A025426(A000578(n)).

%e n=100: 100^3 = 1000000 = 960^2 + 280^2 = 936^2 + 352^2 = 800^2 + 600^2, therefore a(100)=3.

%o (Haskell)

%o a084888 = a025426 . a000578 -- _Reinhard Zumkeller_, Jul 18 2012

%o (PARI) a(n)=my(f=factor(n^3)); (prod(i=1,#f~,if(f[i,1]%4==1,f[i,2]+1,f[i,2]%2==0||f[i,1]<3))-issquare(n)+1)\2 \\ _Charles R Greathouse IV_, May 18 2016

%o (Python)

%o from math import prod

%o from sympy import factorint

%o def A084888(n): return ((m:=prod(1 if p==2 else (3*e+1 if p&3==1 else (3*e+1)&1) for p, e in factorint(n).items()))+((((~n**3 & n**3-1).bit_length()&1)<<1)-1 if m&1 else 0))>>1 # _Chai Wah Wu_, May 17 2023

%Y Cf. A000404, A063725, A000578, A000290.

%K nonn

%O 0,6

%A _Reinhard Zumkeller_, Jun 10 2003

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 April 23 06:45 EDT 2024. Contains 371906 sequences. (Running on oeis4.)