OFFSET
2,2
COMMENTS
a(n) is the unique number k in [1, 2^n] and congruent to 1 mod 4 such that 5*k^2 + 3 is divisible by 2^(n+1).
LINKS
Jianing Song, Table of n, a(n) for n = 2..1000
FORMULA
a(2) = 1; for n >= 3, a(n) = a(n-1) if 5*a(n-1)^2 + 3 is divisible by 2^(n+1), otherwise a(n-1) + 2^(n-1).
a(n) = 2^n - A341601(n).
a(n) = Sum_{i=0..n-1} A341602(i)*2^i.
a(n) == Fibonacci(2^(2*n-1)) (mod 2^n). - Peter Bala, Nov 11 2022
EXAMPLE
The unique number k in [1, 4] and congruent to 1 modulo 4 such that 5*k^2 + 3 is divisible by 8 is 1, so a(2) = 1.
5*a(2)^2 + 3 = 8 which is not divisible by 16, so a(3) = a(2) + 2^2 = 5.
5*a(3)^2 + 3 = 128 which is divisible by 32, 64 and 128, so a(6) = a(5) = a(4) = a(3) = 5.
...
PROG
(PARI) a(n) = truncate(-sqrt(-3/5+O(2^(n+1))))
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Jianing Song, Feb 16 2021
STATUS
approved