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-3 of 3 results.

A367068 a(n) = ((Sum_{i=1..n} A340510(i))-1)/(n+1).

Original entry on oeis.org

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, 18, 19, 19, 20, 20, 21, 22, 22, 23, 24, 24, 25, 25, 26, 27, 27, 28, 29, 29, 30, 30, 31, 32, 32, 33, 33, 34, 35, 35, 36, 37, 37, 38, 38, 39, 40, 40, 41, 42, 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(1) sequence.
Is this a duplicate of A005379? For n<=1300 at least a(n)=A005379(n). - R. J. Mathar, Jan 30 2024

Crossrefs

Cf. A340510.
Cf. A073869 (AZM(0)), A367066 (AZM(2)).

Programs

  • 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
  • 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:])

Formula

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).

A367065 a(1)=2, thereafter a(n) is the least positive integer not yet in the sequence such that Sum_{i=1..n} a(i) == 2 (mod n+2).

Original entry on oeis.org

2, 4, 1, 7, 9, 3, 12, 14, 5, 17, 6, 20, 22, 8, 25, 27, 10, 30, 11, 33, 35, 13, 38, 40, 15, 43, 16, 46, 48, 18, 51, 19, 54, 56, 21, 59, 61, 23, 64, 24, 67, 69, 26, 72, 74, 28, 77, 29, 80, 82, 31, 85, 32, 88, 90, 34, 93, 95, 36, 98, 37, 101, 103, 39, 106, 108, 41, 111, 42, 114
Offset: 1

Views

Author

Zenan Sabanac, Nov 03 2023

Keywords

Comments

This is the Avdispahić-Zejnulahi sequence AZ(2). For a positive integer k, the Avdispahić-Zejnulahi sequence AZ(k) is given by: a(1)=k, thereafter a(n) is the least positive integer not yet in the sequence such that Sum_{i=1..n} a(i) == k (mod n+k). It is interesting to note that (AZ(k)) represents a sequence of permutations of the set of positive integers. (See Links section for details concerning AZ(1).)

Crossrefs

A340510 is the AZ(1) sequence. A002251 is the AZ(0) sequence.

Programs

  • Mathematica
    lst={2}; f[s_List]:=Block[{k=1,len=3+Length@lst,t=Plus@@lst},While[MemberQ[s,k]||Mod[k+t,len]!=2,k++]; AppendTo[lst,k]]; Nest[f,lst,100]
  • Python
    z_list = [-1, 2, 4]
    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+2)
        else:
            m_list.append(m_list[n])
            z_list.append(m_list[n+1])
    print(z_list[1:])

A367067 a(1)=3, thereafter a(n) is the least positive integer not yet in the sequence such that Sum_{i=1..n} a(i) == 3 (mod n+3).

Original entry on oeis.org

3, 5, 1, 8, 2, 11, 13, 4, 16, 18, 6, 21, 7, 24, 26, 9, 29, 10, 32, 34, 12, 37, 39, 14, 42, 15, 45, 47, 17, 50, 52, 19, 55, 20, 58, 60, 22, 63, 23, 66, 68, 25, 71, 73, 27, 76, 28, 79, 81, 30, 84, 31, 87, 89, 33, 92, 94, 35, 97, 36, 100, 102, 38, 105
Offset: 1

Views

Author

Zenan Sabanac, Nov 03 2023

Keywords

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).

Crossrefs

Programs

  • 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]
  • 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:])
Showing 1-3 of 3 results.