A343528 Number of ways to write n as x^4 + T(y)^2 + T(z) + 2^w, where x,y,z are nonnegative integers, w is a positive integer, and T(m) denotes the triangular number m*(m+1)/2.
0, 1, 3, 4, 5, 5, 3, 4, 6, 5, 5, 6, 5, 6, 6, 4, 7, 10, 10, 9, 7, 4, 7, 10, 7, 8, 9, 7, 5, 7, 7, 10, 13, 9, 8, 7, 5, 8, 14, 9, 10, 11, 6, 9, 10, 8, 10, 13, 8, 7, 6, 5, 11, 15, 9, 7, 8, 6, 8, 10, 10, 10, 10, 6, 7, 9, 6, 10, 17, 10, 9, 9, 6, 10, 10, 6, 9, 9, 6, 10, 9, 6, 11, 14, 8, 11, 11, 9, 11, 11
Offset: 1
Keywords
Examples
a(2) = 1 with 2 = 0^4 + T(0)^2 + T(0) + 2^1. a(7) = 3, and 7 = 0^4 + T(0)^2 + T(2) + 2^2 = 1^4 + T(1)^2 + T(1) + 2^2 = 1^4 + T(1)^2 + T(2) + 2^1.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
TQ[n_]:=TQ[n]=IntegerQ[Sqrt[8n+1]]; tab={};Do[r=0;Do[If[TQ[n-x^4-(y(y+1)/2)^2-2^k],r=r+1],{x,0,(n-1)^(1/4)},{y,0,(Sqrt[8*Sqrt[n-x^4-1]+1]-1)/2},{k,1,Log[2,n-x^4-(y(y+1)/2)^2]}];tab=Append[tab,r],{n,1,90}];Print[tab]
Comments