← Complete problem index

PROJECT EULER · #0918

Recursive Sequence Summation

Statement only · SolvedOriginal problem ↗

The sequence an is defined by a1=1, and then recursively for n≥1: a2n=2ana2n+1=an−3an+1 The first ten terms are 1,2,−5,4,17,−10,−17,8,−47,34.
Define S(N)=∑n=1Nan. You are given S(10)=−13.
Find S(1012).

Write-up coming later

The complete problem is available here. An approach, code, and answer will be added later.