editing
proposed
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”).
editing
proposed
Joseph Likar, <a href="/A371283/b371283_1.txt">Table of n, a(n) for n = 1..10000</a>
a(51) onwards by Joseph Likar, Aug 25 2024
approved
editing
editing
proposed
Joseph Likar, <a href="/A371288/b371288_1.txt">Table of n, a(n) for n = 1..10000</a>
a(60) onwards by Joseph Likar, Aug 25 2024
approved
editing
editing
proposed
0, 0, 0, 1, 1, 2, 4, 5, 7, 11, 16, 20, 28, 37, 50, 65, 84, 106, 140, 175, 222, 277, 350, 432, 539, 663, 819, 999, 1225, 1489, 1816, 2192, 2653, 3191, 3846, 4603, 5516, 6578, 7852, 9327, 11083, 13120, 15532, 18328, 21620, 25430, 29904, 35071, 41110, 48080
Joseph Likar, <a href="/A344654/b344654_1.txt">Table of n, a(n) for n = 0..1000</a>
nonn,more
nonn
a(33) onwards from Joseph Likar, Sep 06 2023
approved
editing
editing
proposed
From Joseph Likar, Aug 21 2023: (Start)
This sequence can be generated by the following pseudo code:
outputMap[2 to n] = n
for usedNumbers = 2 to n
for medianSize = ceil(usedNumbers / 2) + 1 to usedNumbers - 1
for medianValue = 1 to floor((n - usedNumbers + medianSize) / medianSize)
for numbersAboveMedian = 0 to usedNumbers - medianSize
calculateState(usedNumbers, medianSize, medianValue, numbersAboveMedian)
next numbersAboveMedian
next medianValue
next medianSize
if (usedNumbers mod 2 == 1)
for medianValue = 2 to Math.floor((n - usedNumbers + ceil(usedNumbers / 2))/ceil(usedNumbers / 2))
for numbersAboveMedian = 1 to usedNumbers - ceil(usedNumbers / 2) - 1
calculateState(usedNumbers, ceil(usedNumbers / 2), medianValue, numbersAboveMedian)
next numbersAboveMedian
next medianValue
endif
next usedNumbers
function calculateState(usedNumbers, medianSize, medianValue, numbersAboveMedian)
numbersBelowMedian = usedNumbers - medianSize - numbersAboveMedian)
bottomQTerms = gaussianBinomial(numbersBelowMedian + (medianValue - 1) - 1, numbersBelowMedian)
topQTerms = gaussianBinomial(n - 1 - 2 * numbersAboveMedian, numbersAboveMedian)
for bottomOffset = 0 to length(bottomQTerms) - 1
for topOffset = 0 to length(topQTerms) - 1
partitionSum = bottomOffset + topOffset + numbersBelowMedian + (medianSize * medianValue) + (numbersAboveMedian * (medianValue + 1));
if (partitionSum <= n)
outputMap[partitionSum] += bottomQTerms[bottomOffset] * topQTerms[topOffset]
next topOffset
next bottomOffset
end
where gaussianBinomial(m, n) takes the Gaussian Binomial (m choose n)_q and returns a zero-indexed array where each value in the array is the coefficient of q^index in the Gaussian binomial expansion. (End)
Joseph Likar, <a href="/A345165/a345165.java.txt">Java Implementation</a> using QBinomials
proposed
editing
editing
proposed
nonn,more,changed
approved
editing