login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A369886
a(n) is the least positive integer that can be expressed as +- 1 +- 2 +- 3 +- ... +- n in exactly n ways, or -1 if no such integer exists.
0
1, -1, -1, -1, -1, -1, 6, 16, 25, 35, -1, 56, -1, -1, 96, -1, -1, 145, -1, -1, -1, 225, -1, -1, -1, -1, 348, -1, -1, -1, -1, 496, -1, -1, -1, -1, -1, 707, -1, -1, -1, -1, -1, -1, -1, 1045, -1, -1, -1, -1, -1, -1, -1, 1447, -1
OFFSET
1,7
EXAMPLE
a(7) = 6: 6 = + 1 + 2 + 3 - 4 + 5 + 6 - 7
= - 1 + 2 - 3 + 4 + 5 + 6 - 7
= + 1 + 2 + 3 + 4 - 5 - 6 + 7
= - 1 + 2 + 3 - 4 + 5 - 6 + 7
= + 1 - 2 - 3 + 4 + 5 - 6 + 7
= + 1 - 2 + 3 - 4 - 5 + 6 + 7
= - 1 - 2 - 3 + 4 - 5 + 6 + 7.
CROSSREFS
Sequence in context: A114222 A348229 A275641 * A171440 A031220 A011536
KEYWORD
sign
AUTHOR
Ilya Gutkovskiy, Feb 04 2024
STATUS
approved