Linear Recurrence Term
A sequence has a(1) = 1 and a(k) = 2*a(k-1) + 1. Print a(n) modulo 1,000,000,007.
Constraints
1 <= n <= 10^18
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.