login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A256171 Number of ways to write n as the sum of three unordered generalized heptagonal numbers. 2
1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 0, 1, 2, 1, 2, 3, 0, 1, 3, 1, 2, 3, 1, 1, 1, 1, 3, 3, 1, 2, 1, 2, 3, 1, 2, 4, 2, 1, 3, 2, 2, 3, 2, 1, 2, 2, 2, 3, 3, 2, 1, 2, 2, 3, 5, 2, 2, 2, 2, 3, 4, 2, 2, 4, 1, 3, 2, 1, 4, 3, 2, 2, 5, 2, 4, 3, 0, 4, 2, 1, 3, 6, 3, 3, 3, 1, 5, 2, 3, 5, 2, 2, 3, 3, 1, 5, 3, 1, 3, 3, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET

0,9

COMMENTS

Conjecture: (i) a(n) > 0 except for n = 10, 16, 76, 307.

(ii) For any integer m > 2 not divisible by 4, each sufficiently large integer n can be written as the sum of three generalized m-gonal numbers.

In 1994 R. K. Guy noted that none of 10, 16 and 76 can be written as the sum of three generalized heptagonal numbers.

LINKS

Zhi-Wei Sun, Table of n, a(n) for n = 0..10000

R. K. Guy, Every number is expressible as the sum of how many polygonal numbers?, Amer. Math. Monthly 101 (1994), 169-172.

Zhi-Wei Sun, A result similar to Lagrange's theorem, arXiv:1503.03743 [math.NT], 2015.

EXAMPLE

a(157) = 1 since 157 = 3*(5*3-3)/2 + (-3)*(5*(-3)-3)/2 + 7*(5*7-3)/2.

a(748) = 1 since 748 = 0*(5*0-3)/2 + 0*(5*0-3)/2 + (-17)*(5*(-17)-3)/2.

MATHEMATICA

T[n_]:=Union[Table[x(5x-3)/2, {x, -Floor[(Sqrt[40n+9]-3)/10], Floor[(Sqrt[40n+9]+3)/10]}]]

L[n_]:=Length[T[n]]

Do[r=0; Do[If[Part[T[n], x]>n/3, Goto[aa]]; Do[If[Part[T[n], x]+2*Part[T[n], y]>n, Goto[bb]];

If[MemberQ[T[n], n-Part[T[n], x]-Part[T[n], y]]==True, r=r+1];

Continue, {y, x, L[n]}]; Label[bb]; Continue, {x, 1, L[n]}]; Label[aa]; Print[n, " ", r]; Continue, {n, 0, 100}]

CROSSREFS

Cf. A085787, A255934.

Sequence in context: A287455 A216789 A097951 * A058643 A029368 A108483

Adjacent sequences:  A256168 A256169 A256170 * A256172 A256173 A256174

KEYWORD

nonn

AUTHOR

Zhi-Wei Sun, Mar 17 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent | More pages
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified October 18 22:40 EDT 2018. Contains 316327 sequences. (Running on oeis4.)