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.

A254574 Number of ways to write n = x*(x+1)/2 + y*(3*y+1)/2 + z*(3*z-1)/2 with x,y,z nonnegative integers.

This page as a plain text file.
%I A254574 #15 Jul 23 2025 14:50:33
%S A254574 1,2,2,3,2,2,3,3,5,2,3,3,3,5,2,6,3,5,5,2,4,3,8,4,3,4,4,6,6,6,7,3,4,5,
%T A254574 3,6,5,8,5,4,6,8,5,8,5,5,4,6,10,1,7,6,10,5,4,7,6,7,9,6,6,6,8,10,4,7,5,
%U A254574 9,7,7,4
%N A254574 Number of ways to write n = x*(x+1)/2 + y*(3*y+1)/2 + z*(3*z-1)/2 with x,y,z nonnegative integers.
%C A254574 Conjecture: (i) a(n) > 0 for all n. Also, a(n) = 1 only for n = 0, 49.
%C A254574 (ii) Any nonnegative integer not equal to 18 can be written as x*(x+1)/2 + y*(3*y+1) + z*(3*z-1) with x,y,z nonnegative integers.
%C A254574 See also the comments of A254573 for a similar conjecture. We have proved that any nonnegative integer can be written as x*(x+1)/2 + y*(3*y+1)/2 + z*(3*z-1)/2 with x,y,z integers.
%C A254574 Note that Zhi-Wei Sun conjectured in 2009 (cf. Conjecture 1.10 of arXiv:0905.0635) that every n = 0,1,... can be expressed as the sum of a triangular number and two pentagonal numbers.
%H A254574 Zhi-Wei Sun, <a href="/A254574/b254574.txt">Table of n, a(n) for n = 0..10000</a>
%H A254574 Zhi-Wei Sun, <a href="http://arxiv.org/abs/0905.0635">On universal sums of polygonal numbers</a>, arXiv:0905.0635 [math.NT], 2009-2015.
%e A254574 a(14) = 2 since 14 = 0*1/2 + 1*(3*1+1)/2 + 3*(3*3-1)/2 = 3*4/2 + 2*(3*2+1)/2 + 1*(3*1-1)/2.
%e A254574 a(49) = 1 since 49 = 1*2/2 + 4*(3*4+1)/2 + 4*(3*4-1)/2.
%t A254574 TQ[n_]:=IntegerQ[Sqrt[8n+1]]
%t A254574 Do[r=0;Do[If[TQ[n-y(3y+1)/2-z(3z-1)/2],r=r+1],{y,0,(Sqrt[24n+1]-1)/6},{z,0,(Sqrt[24(n-y(3y+1)/2)+1]+1)/6}];
%t A254574 Print[n," ",r];Continue,{n,0,70}]
%Y A254574 Cf. A000217, A000326, A005449, A254573.
%K A254574 nonn
%O A254574 0,2
%A A254574 _Zhi-Wei Sun_, Feb 01 2015