A262979 Number of ordered ways to write n as x^4 + phi(y^2) + z*(3*z-1)/2 with x >= 0 and y > 0, where phi(.) is Euler's totient function given by A000010.
1, 3, 4, 3, 1, 2, 4, 5, 5, 3, 2, 2, 5, 6, 3, 2, 4, 5, 4, 4, 4, 5, 5, 7, 5, 2, 4, 6, 6, 3, 2, 4, 6, 5, 5, 4, 5, 4, 4, 4, 5, 7, 9, 6, 3, 4, 6, 9, 5, 6, 2, 4, 7, 6, 8, 6, 6, 8, 7, 7, 4, 4, 8, 6, 4, 4, 3, 5, 5, 6, 7, 5, 4, 3, 5, 5, 5, 5, 6, 4, 3, 5, 8, 7, 6, 4, 5, 5, 8, 8, 5, 5
Offset: 1
Keywords
Examples
a(5) = 1 since 5 = 1^4 + phi(2^2) + (-1)*(3*(-1)-1)/2. a(6) = 2 since 6 = 0^4 + phi(1^2) + 2*(3*2-1)/2 = 0^4 + phi(3^2) + 0*(3*0-1)/2. a(16) = 2 since 16 = 0^4 + phi(1^2) + (-3)*(3*(-3)-1)/2 = 1^4 + phi(4^2) + (-2)*(3*(-2)-1)/2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Crossrefs
Programs
-
Mathematica
f[n_]:=EulerPhi[n^2] PenQ[n_]:=IntegerQ[Sqrt[24n+1]] Do[r=0;Do[If[f[x]>n,Goto[aa]];Do[If[PenQ[n-f[x]-y^4],r=r+1],{y,0,(n-f[x])^(1/4)}];Label[aa];Continue,{x,1,n}];Print[n," ",r];Continue,{n,1,100}]
Comments