%I #16 Jan 30 2024 09:58:01
%S 0,1,2,2,3,4,4,5,6,6,7,7,8,9,9,10,11,11,12,12,13,14,14,15,16,16,17,17,
%T 18,19,19,20,20,21,22,22,23,24,24,25,25,26,27,27,28,29,29,30,30,31,32,
%U 32,33,33,34,35,35,36,37,37,38,38,39,40,40,41,42,42
%N a(n) = ((Sum_{i=1..n} A340510(i))-1)/(n+1).
%C 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).
%C 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.
%C Is this a duplicate of A005379? For n<=1300 at least a(n)=A005379(n). - _R. J. Mathar_, Jan 30 2024
%H Muharem Avdispahić and Faruk Zejnulahi, <a href="https://www.researchgate.net/publication/341726940_AN_INTEGER_SEQUENCE_WITH_A_DIVISIBILITY_PROPERTY">An integer sequence with a divisibility property</a>, Fibonacci Quarterly, Vol. 58:4 (2020), 321-333.
%F For n>2, a(n) = a(n-1) if a(n-1) <> A340510(k) (for k=1..n-1) and a(n) = a(n-1)+1=A340510(n)-n otherwise. (See Proposition 3.1. of Avdispahić and Zejnulahi in the link above).
%p A367068 := proc(n)
%p add(A340510(i),i=1..n)-1 ;
%p %/(n+1) ;
%p end proc:
%p seq(A367068(n),n=1..50) ; # _R. J. Mathar_, Jan 30 2024
%t zlist = {-1, 1, 3};
%t mlist = {-1, 0, 1};
%t For[n = 3, n <= 101, n++,
%t If[MemberQ[zlist, mlist[[n]]], AppendTo[mlist, mlist[[n]] + 1];
%t AppendTo[zlist, mlist[[n + 1]] + n];, AppendTo[mlist, mlist[[n]]];
%t AppendTo[zlist, mlist[[n + 1]]];];];
%t mlist = Drop[mlist, 1]; mlist
%o (Python)
%o z_list=[-1, 1, 3]
%o m_list=[-1, 0, 1]
%o n=2
%o for n in range(2, 100):
%o if m_list[n] in z_list:
%o m_list.append(m_list[n] + 1)
%o z_list.append(m_list[n+1] + n+1)
%o else:
%o m_list.append(m_list[n])
%o z_list.append(m_list[n+1])
%o print(m_list[1:])
%Y Cf. A340510.
%Y Cf. A073869 (AZM(0)), A367066 (AZM(2)).
%K nonn
%O 1,3
%A _Zenan Sabanac_, Dec 17 2023