cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

Original entry on oeis.org

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

Views

Author

Zhi-Wei Sun, Oct 29 2013

Keywords

Comments

Conjecture: a(n) > 0 for all n > 17.
Note that a(4*k) > 0 for all k > 0 since 4*k = k + k + 2*k and k^2 + k^2 + 2*k^2 = (2*k)^2.
See also A230121 for a related conjecture.
The conjecture was confirmed by Chao Haung and Zhi-Wei Sun in 2021. - Zhi-Wei Sun, May 09 2021

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.
		

Crossrefs

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}]