OFFSET
1,5
COMMENTS
a(n) = 0 see A276488.
FORMULA
a(n) = A003714(n) mod n.
EXAMPLE
a(5) = A003714(5) mod 5 = 8 mod 5 = 3.
MATHEMATICA
fib = Select[Range[300], BitAnd[#, 2*#] == 0 &]; Mod[fib, Range[Length[fib]]] (* Amiram Eldar, Sep 10 2022 *)
PROG
(Python)
def A357073(n):
tlist, s, m = [1, 2], 0, n
while (t:=tlist[-1]+tlist[-2]) <= n:
tlist.append(t)
for d in tlist[::-1]:
s = (s<<1)%n
if d <= m:
s = (s+1)%n
m -= d
return s # Chai Wah Wu, Sep 11 2022
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Sep 10 2022
STATUS
approved