login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A357073
For n >= 1, a(n) = A003714(n) mod n.
2
0, 0, 1, 1, 3, 3, 3, 0, 8, 8, 9, 9, 6, 5, 4, 4, 3, 4, 3, 2, 1, 21, 20, 20, 19, 20, 19, 18, 22, 21, 20, 20, 19, 26, 24, 22, 21, 19, 19, 17, 15, 18, 16, 14, 13, 11, 19, 17, 15, 14, 12, 12, 10, 8, 36, 33, 30, 28, 25, 24, 21, 18, 20, 17, 14, 12, 9, 16, 13, 10, 8, 5
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
Sequence in context: A202698 A320785 A164884 * A019801 A086634 A066601
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Sep 10 2022
STATUS
approved