A230747 Number of ways to write n = x + y + 2*z with 0 < x <= y and z > 0 such that x^2 + y^2 + 2*z^2 is a square.
0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 0, 1, 2, 0, 1, 4, 0, 2, 1, 3, 1, 1, 1, 1, 4, 4, 3, 1, 2, 3, 1, 8, 2, 1, 3, 4, 4, 3, 6, 3, 2, 4, 3, 3, 5, 3, 2, 7, 7, 8, 3, 7, 5, 6, 6, 1, 4, 4, 6, 8, 7, 2, 6, 14, 8, 6, 5, 7, 4, 10, 6, 4, 5, 7, 7, 6, 10, 10, 4, 14, 11, 6, 8, 11, 8, 6, 6, 3, 8, 10, 11, 9, 7, 6, 13, 19, 4, 11, 8, 16
Offset: 1
Keywords
Examples
a(9) = 1 since 9 = 1 + 4 + 2*2 with 1^2 + 4^2 + 2*2^2 = 5^2. a(21) = 1 since 21 = 5 + 8 + 2*4 with 5^2 + 8^2 + 2*4^2 = 11^2. a(34) = 1 since 34 = 7 + 25 + 2*1 with 7^2 + 25^2 + 2*1^2 = 26^2. a(56) = 1 since 56 = 14 + 14 + 2*14 with 14^2 + 14^2 + 2*14^2 = 28^2.
Links
- Zhi-Wei Sun, Table of n, a(n) for n = 1..4000
- Chao Huang and Zhi-Wei Sun, On partitions of integers with restrictions involving squares, arXiv:2105.03416 [math.NT], 2021.
- Zhi-Wei Sun, Diophantine problems involving triangular numbers and squares, a message to Number Theory List, Oct. 11, 2013.
Programs
-
Mathematica
SQ[n_]:=IntegerQ[Sqrt[n]] a[n_]:=Sum[If[SQ[2i^2+j^2+(n-2i-j)^2],1,0],{i,1,(n-2)/2},{j,1,(n-2i)/2}] Table[a[n],{n,1,100}]
Comments