OFFSET
1,3
COMMENTS
For a positive integer k define the Avdispahić-Zejnulahi sequence AZ(k) by b(1)=k, and thereafter b(n) is the least positive integer not yet in the sequence such that Sum_{i=1..n} b(i) == k (mod n+k).
Define the Avdispahić-Zejnulahi means sequence AZM(k) by a(n) = ((Sum_{i=1..n} b(i))-k)/(n+k). This is the AZM(1) sequence.
LINKS
Muharem Avdispahić and Faruk Zejnulahi, An integer sequence with a divisibility property, Fibonacci Quarterly, Vol. 58:4 (2020), 321-333.
FORMULA
MAPLE
A367068 := proc(n)
add(A340510(i), i=1..n)-1 ;
%/(n+1) ;
end proc:
seq(A367068(n), n=1..50) ; # R. J. Mathar, Jan 30 2024
MATHEMATICA
zlist = {-1, 1, 3};
mlist = {-1, 0, 1};
For[n = 3, n <= 101, n++,
If[MemberQ[zlist, mlist[[n]]], AppendTo[mlist, mlist[[n]] + 1];
AppendTo[zlist, mlist[[n + 1]] + n]; , AppendTo[mlist, mlist[[n]]];
AppendTo[zlist, mlist[[n + 1]]]; ]; ];
mlist = Drop[mlist, 1]; mlist
PROG
(Python)
z_list=[-1, 1, 3]
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+1)
else:
m_list.append(m_list[n])
z_list.append(m_list[n+1])
print(m_list[1:])
CROSSREFS
KEYWORD
nonn
AUTHOR
Zenan Sabanac, Dec 17 2023
STATUS
approved