← Complete problem index

PROJECT EULER · #0771

Pseudo Geometric Sequences

Statement only · UnsolvedOriginal problem ↗

We define a pseudo-geometric sequence to be a finite sequence a0,a1,,an of positive integers, satisfying the following conditions:

  • n4, i.e. the sequence has at least 5 terms.
  • 0<a0<a1<<an, i.e. the sequence is strictly increasing.
  • |ai2ai1ai+1|2 for 1in1.

Let G(N) be the number of different pseudo-geometric sequences whose terms do not exceed N.
For example, G(6)=4, as the following 4 sequences give a complete list:

1,2,3,4,51,2,3,4,62,3,4,5,61,2,3,4,5,6

Also, G(10)=26, G(100)=4710 and G(1000)=496805.

Find G(1018). Give your answer modulo 1000000007.

Write-up coming later

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