The SumSum
Given a finite sequence of length N, a0,a1,a2,…,aN−1, let's first remove the sequence's first element. We then define the sequence of the partial sums of its remaining elements as a1,a1+a2,a1+a2+a3,…,∑i=1N−1ai.
For this sequence of length N−1, let's repeat the "remove first element" and "generate new sequence from the partial sums" operations to obtain sequences of length N−2,N−3,N−4,…,N−(N−1) until we end up with a one-element sequence. We call this element The SumSum of the original sequence.
For example, given the 10-element sequence 1,2,3,4,5,6,7,8,9,10, the SumSum of the sequence is 16,796.
Your goal: For N=1010 and p=1010+19, find the SumSum modulo p of the sequence a0,…,aN−1 defined by ai=(iN).
A Bonus "*" will be given for finding for N=1011 and p=1011+3 the SumSum modulo p of the sequence given by ai=13i.
Solvers
- Daniel Chong Jyh Tar (1/11/2026 6:26 PM IDT)
- *Lazar Ilic (1/11/2026 7:58 PM IDT)
- *Paul Lupascu (1/11/2026 8:43 PM IDT)
- *Jean-François Hermant (1/11/2026 8:45 PM IDT)
- *Prashant Wankhede (1/11/2026 9:14 PM IDT)
- *Ankit Chakraborty (1/11/2026 9:24 PM IDT)
- *Nadir S. (1/11/2026 9:47 PM IDT)
- *Alper Halbutogullari (1/11/2026 11:05 PM IDT)
- *Jackson La Vallee (1/11/2026 11:23 PM IDT)
- Ahmet Yuksel & Nihal Pala (2/11/2026 12:22 AM IDT)
- *Bertram Felgenhauer (2/11/2026 1:09 AM IDT)
- Stéphane Higueret (2/11/2026 1:45 AM IDT)
- *King Pig (2/11/2026 3:55 AM IDT)
- *Guangxi Liu (2/11/2026 5:09 AM IDT)
- *Björn Richard Nerbe (2/11/2026 8:59 AM IDT)
- *Juergen Koehl (2/11/2026 10:29 AM IDT)
- *Kang Jin Cho (2/11/2026 10:59 AM IDT)
- *Lucas Reymond (2/11/2026 1:57 PM IDT)