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

A367066 a(n) = ((Sum_{i=1..n} A367065(i))-2)/(n+2).

Original entry on oeis.org

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

Views

Author

Zenan Sabanac, Nov 03 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(2) sequence.

Crossrefs

Cf. A367065.

Programs

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

Formula

Conjecture: a(n) = floor(n/phi + 1/phi^3) - [n+2 = Fibonacci(2*j+1) for some j], where phi = (1+sqrt(5))/2 and [] is the Iverson bracket. - Jon E. Schoenfield, Nov 03 2023

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