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.

A283239 Number of ways to write n as x^2 + y^2 + z*(3*z-1)/2 with x,y,z integers such that x + 2*y is a square.

This page as a plain text file.
%I A283239 #14 Jul 21 2023 12:56:38
%S A283239 1,2,3,2,2,5,5,5,1,2,4,2,5,3,3,4,3,7,5,3,8,3,5,3,2,6,3,7,5,3,4,7,5,3,
%T A283239 4,6,5,3,3,7,5,5,5,1,6,7,6,4,3,2,5,5,9,6,3,7,5,7,5,4,8,5,6,4,6,5,5,8,
%U A283239 5,6,6,7,5,5,5,7,5,6,2,4,12
%N A283239 Number of ways to write n as x^2 + y^2 + z*(3*z-1)/2 with x,y,z integers such that x + 2*y is a square.
%C A283239 Conjecture: (i) a(n) > 0 for all n = 0,1,2,..., and a(n) = 1 only for n = 0, 8, 43, 84, 133, 253, 399, 488, 523, 803, 7369.
%C A283239 (ii) Any integer n > 1 can be written as p + x^2 + y^2 with p prime and x + 2*y (or x + 3*y) a square, where x is an integer and y is a nonnegative integer.
%C A283239 Note that those numbers z*(3*z-1)/2 with z integral are called generalized pentagonal numbers (A001318). By Theorem 1.7(ii) of the linked paper in Sci. China Math., each n = 0,1,2,... can be written as the sum of two squares and a generalized pentagonal number.
%C A283239 Ju. V. Linnik proved in 1960 that any sufficiently large integer can be expressed as the sum of a prime and two squares.
%H A283239 Zhi-Wei Sun, <a href="/A283239/b283239.txt">Table of n, a(n) for n = 0..10000</a>
%H A283239 Ju. V. Linnik, <a href="http://mi.mathnet.ru/eng/izv3674">An asymptotic formula in an additive problem of Hardy-Littlewood</a>, Izv. Akad. Nauk SSSR Ser. Mat., 24 (1960), 629-706 (Russian).
%H A283239 Zhi-Wei Sun, <a href="https://www.sciengine.com/SCM/doi/10.1007/s11425-015-4994-4">On universal sums of polygonal numbers</a>, Sci. China Math. 58 (2015), no. 7, 1367-1396.
%H A283239 Zhi-Wei Sun, <a href="http://dx.doi.org/10.1016/j.jnt.2016.11.008">Refining Lagrange's four-square theorem</a>, J. Number Theory 175 (2017), 167-190.
%H A283239 Zhi-Wei Sun, <a href="http://arxiv.org/abs/1701.05868">Restricted sums of four squares</a>, arXiv:1701.05868 [math.NT], 2017.
%e A283239 a(8) = 1 since 8 = 1^2 + 0^2 + (-2)*(3*(-2)-1)/2 with 1 + 2*0 = 1^2.
%e A283239 a(43) = 1 since 43 = 1^2 + 4^2 + (-4)*(3*(-4)-1)/2 with 1 + 2*4 = 3^2.
%e A283239 a(84) = 1 since 84 = 7^2 + (-3)^2 + (-4)*(3*(-4)-1)/2 with 7 + 2*(-3) = 1^2.
%e A283239 a(133) = 1 since 133 = 4^2 + 0^2 + 9*(3*9-1)/2 with 4 + 2*0 = 2^2.
%e A283239 a(253) = 1 since 253 = (-13)^2 + 7^2 + 5*(3*5-1)/2 with (-13) + 2*7 = 1^2.
%e A283239 a(399) = 1 since 399 = 18^2 + (-7)^2 + (-4)*(3*(-4)-1)/2 with 18 + 2*(-7) = 2^2.
%e A283239 a(488) = 1 since 488 = 9^2 + 20^2 + (-2)*(3*(-2)-1)/2 with 9 + 2*20 = 7^2.
%e A283239 a(523) = 1 since 523 = 9^2 + 0^2 + (-17)*(3*(-17)-1)/2 with 9 + 2*0 = 3^2.
%e A283239 a(803) = 1 since 803 = (-17)^2 + 13^2 + (-15)*(3*(-15)-1)/2 with (-17) + 2*13 = 3^2.
%e A283239 a(7369) = 1 since 7369 = 0^2 + 72^2 + (-38)*(3*(-38)-1)/2 with 0 + 2*72 = 12^2.
%t A283239 SQ[n_]:=SQ[n]=IntegerQ[Sqrt[n]];
%t A283239 PenQ[n_]:=PenQ[n]=SQ[24n+1];
%t A283239 Do[r=0;Do[If[PenQ[n-x^2-y^2],Do[If[SQ[(-1)^i*x+2(-1)^j*y],r=r+1],{i,0,Min[x,1]},{j,0,Min[y,1]}]],{x,0,Sqrt[n]},{y,0,Sqrt[n-x^2]}];Print[n," ",r];Continue,{n,0,80}]
%Y A283239 Cf. A000040, A000290, A001318, A001481, A276415, A283170, A283196, A283204, A283205.
%K A283239 nonn
%O A283239 0,2
%A A283239 _Zhi-Wei Sun_, Mar 03 2017