OFFSET
0,3
COMMENTS
The sequence is defined inductively. Starting from the empty sequence, the terms are added one after the other. A term is added if it is a generalized pentagonal number or if it cannot be represented as the sum of two preceding terms. Note that these exceptions form a proper subsequence of A093519.
Thus any positive number can be expressed as the sum of at most two positive terms by Euler's Pentagonal Number Theorem. Every pentagonal number and every generalized pentagonal number is in this sequence.
LINKS
Andreas Enge, William Hart and Fredrik Johansson, Short addition sequences for theta functions, arXiv:1608.06810 [math.NT], 2016.
Burkard Polster (Mathloger), The hardest 'What comes next?' (Euler's pentagonal formula), YouTube video, 2020.
EXAMPLE
32 = 7 + 25; 195 = 22 + 173.
MAPLE
MATHEMATICA
isgpn[k_] := AnyTrue[Range[0, k], 0 == 8*k-(#+Mod[#, 2])*(3*#+2-Mod[#, 2])&];
issum[k_] := AnyTrue[P, MemberQ[P, k-#]&];
P = {};
For[k = 0, k <= 448, k++, If[isgpn[k] || !issum[k], AppendTo[P, k]]];
P (* Jean-François Alcover, Mar 07 2024, after Peter Luschny *)
PROG
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Jul 17 2022
STATUS
approved