OFFSET
1,1
COMMENTS
This is the Avdispahić-Zejnulahi sequence AZ(3).
Note that AZ(3) is the third term in a sequence of permutations of the set of positive integers defined by a specific divisibility property (see Links section and Crossrefs for details).
LINKS
Muharem Avdispahić and Faruk Zejnulahi, An integer sequence with a divisibility property, Fibonacci Quarterly, Vol. 58:4 (2020), 321-333.
Jeffrey Shallit, Proving properties of some greedily-defined integer recurrences via automata theory, arXiv:2308.06544 [cs.DM], 2023.
MATHEMATICA
lst = {3};
f[s_List] := Block[{k = 1, len = 4 + Length@lst, t = Plus @@ lst},
While[MemberQ[s, k] || Mod[k + t, len] != 3, k++];
AppendTo[lst, k]]; Nest[f, lst, 100]
PROG
(Python)
z_list=[-1, 3, 5]
m_list=[-1, 0, 1]
n=2
for n in range(2, 100):
if m_list[n] in z_list:
m_list.append(m_list[n] + 1)
z_list.append(m_list[n+1] + n+3)
else:
m_list.append(m_list[n])
z_list.append(m_list[n+1])
print(z_list[1:])
CROSSREFS
KEYWORD
nonn
AUTHOR
Zenan Sabanac, Nov 03 2023
STATUS
approved