← Complete problem index

PROJECT EULER · #0915

Giant GCDs

Statement only · UnsolvedOriginal problem ↗

The function s(n) is defined recursively for positive integers by s(1)=1 and s(n+1)=(s(n)1)3+2 for n1.
The sequence begins: s(1)=1,s(2)=2,s(3)=3,s(4)=10,.

For positive integers N, define T(N)=a=1Nb=1Ngcd(s(s(a)),s(s(b))). You are given T(3)=12, T(4)24881925 and T(100)14416749 both modulo 123456789.

Find T(108). Give your answer modulo 123456789.

Write-up coming later

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