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.

A248639 Least nonnegative sequence which does not contain a 4-term equidistant subsequence (a(n+k*d); k=0,1,2,3) in arithmetic progression.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 1, 1, 2, 0, 0, 0, 1, 0, 1, 1, 1, 2, 2, 2, 0, 0, 2, 0, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1, 2, 2, 1, 2, 1, 2, 2, 4, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 1, 1, 1, 2, 0, 1, 0, 0, 0, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 2, 2, 0, 2, 2, 2, 4, 4, 3, 0, 0, 0, 2, 0, 1, 2, 0, 4, 2, 1, 5, 0, 2, 1, 1, 2, 1, 0, 0, 2, 2, 0, 0, 0, 3, 0, 0, 1, 1, 1, 4, 1, 2, 3, 0, 1, 2, 1, 0, 3, 3, 4, 1, 1, 3
Offset: 0

Views

Author

M. F. Hasler, Oct 10 2014

Keywords

Comments

See A248625 for more information, links and examples.
See A248641 for the "positive integers" variant.

Crossrefs

Programs

  • PARI
    a=[];for(n=1,190,a=concat(a,0);while(hasAP(a,4),a[#a]++));a \\ See A248625 for hasAP().

A322286 Lexicographically earliest sequence of positive integers without 4 terms in a weakly increasing arithmetic progression.

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 2, 1, 1, 1, 2, 2, 2, 3, 1, 1, 1, 2, 1, 2, 2, 2, 3, 3, 3, 1, 1, 3, 1, 1, 1, 2, 2, 1, 2, 2, 1, 2, 2, 2, 3, 3, 2, 3, 2, 3, 3, 5, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 2, 2, 2, 3, 1, 2, 1, 1, 1, 2, 2, 2, 3, 4, 2, 3, 2, 2, 2, 3, 3, 1, 3, 3, 3, 5, 5, 4, 1, 1, 1, 3, 1, 2, 3, 1, 5, 3, 2, 6, 1, 3, 2, 1, 3, 2, 1, 1, 3, 3, 1, 1, 1
Offset: 1

Views

Author

Sébastien Palcoux, Aug 28 2019

Keywords

Comments

This is a variation of A248641 (where we only exclude weakly increasing arithmetic progressions): they differ from the 101st term.
It is also a variation of A309890 where 3-term is replaced by 4-term.
The numbers n for which the n-th term is 1 are given by A005837.
There is no upper bound, because if there were an upper bound r then there must be s <= r such that the set of numbers n for which the n-th term is s has positive density and this contradicts Szemerédi's theorem.
Assuming Erdős's conjecture on arithmetic progressions, for a fixed positive integer r, the sum of the reciprocals of the numbers n for which the n-th term is r converges.

Crossrefs

Programs

  • SageMath
    cpdef FourFree(int n):
       cdef int i,r,k,s,L1,L2,L3
       cdef list L,Lb
       cdef set b
       L=[1,1,1]
       for k in range(3,n):
          b=set()
          for i in range(k):
             if 3*((k-i)/3)==k-i:
                r=(k-i)/3
                L1,L2,L3=L[i],L[i+r],L[i+2*r]
                s=3*(L2-L1)+L1
                if s>0 and L3==2*(L2-L1)+L1:
                   if L1<=L2:
                      b.add(s)
          if 1 not in b:
             L.append(1)
          else:
             Lb=list(b)
             Lb.sort()
             for t in Lb:
                if t+1 not in b:
                   L.append(t+1)
                   break
       return L
Showing 1-2 of 2 results.