cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-1 of 1 results.

A367069 a(n) = ((Sum_{i=1..n} A367067(i))-3)/(n+3).

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 4, 4, 5, 6, 6, 7, 7, 8, 9, 9, 10, 10, 11, 12, 12, 13, 14, 14, 15, 15, 16, 17, 17, 18, 19, 19, 20, 20, 21, 22, 22, 23, 23, 24, 25, 25, 26, 27, 27, 28, 28, 29, 30, 30, 31, 31, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39, 40, 40, 41, 41, 42
Offset: 1

Views

Author

Zenan Sabanac, Dec 17 2023

Keywords

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(3) sequence.

Crossrefs

Cf. A367067.
Cf. A073869 (AZM(0)), A367068 (AZM(1)), A367066 (AZM(2)).

Programs

  • Mathematica
    zlist = {-1, 3, 5};
    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 + 2];,
        AppendTo[mlist, mlist[[n]]]; AppendTo[zlist, mlist[[n + 1]]];];];
    mlist = Drop[mlist, 1]; mlist
  • 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(m_list[1:])
Showing 1-1 of 1 results.