The sequence {ak}k=1112 satisfies a1=1 and an=an−11337+n, for all positive integers n. Let
S=⌊a10a13+a11a14+a12a15+⋯+a109a112⌋.
Find the remainder when S is divided by 1000.
This problem is posed by Akshaj.
Details and assumptions
The function ⌊x⌋:R→Z refers to the greatest integer smaller than or equal to x. For example ⌊2.3⌋=2 and ⌊−5⌋=−5.