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

A248627 Index at which the first n appears in A248625 = least nonnegative sequence with no AP (a(n), a(n+d), a(n+2d)).

Original entry on oeis.org

0, 2, 94, 7, 21, 120, 143, 23, 26, 59, 66, 72, 65, 78, 162, 195, 147, 149, 219, 79, 180, 172, 177, 196, 212, 202, 193, 201, 260, 373, 303, 386, 644, 294, 446, 378, 289, 419, 361, 505, 514, 877, 519, 835, 940, 494, 593, 753, 883, 957, 500, 484, 560, 406, 466
Offset: 0

Views

Author

M. F. Hasler, Oct 10 2014

Keywords

Crossrefs

Formula

a(n) = A241752(n)-1.

A285491 Lexicographically earliest sequence of positive integers such that no two distinct unordered pairs of points ((n, a(n)), (m, a(m))) and ((k, a(k)), (j, a(j))) have the same midpoint.

Original entry on oeis.org

1, 1, 2, 1, 4, 6, 2, 9, 1, 13, 8, 19, 2, 15, 12, 28, 32, 6, 4, 18, 43, 1, 51, 16, 36, 41, 28, 34, 2, 57, 66, 10, 80, 5, 31, 24, 61, 71, 89, 12, 107, 128, 18, 99, 42, 1, 123, 142, 10, 38, 78, 164, 120, 21, 1, 58, 183, 169, 99, 93, 203, 22, 200, 155, 7, 130, 228
Offset: 1

Views

Author

Peter Kagey, Apr 19 2017

Keywords

Comments

No three terms a(j), a(j+k), a(j+2k) (for any j and k) form an arithmetic progression.

Examples

			For n = 3:
a(3) != 1 or else midpoint((1, 1), (3, 1)) = midpoint((2, 1), (2, 1)), so
a(3) = 2.
For n = 5:
a(5) != 1 or else midpoint((1, 1), (5, 1)) = midpoint((2, 1), (4, 1));
a(5) != 2 or else midpoint((2, 1), (5, 2)) = midpoint((3, 2), (4, 1));
a(5) != 3 or else midpoint((1, 1), (5, 3)) = midpoint((3, 2), (3, 2)); so
a(5) = 4.
		

Crossrefs

A248641 Lexicographically earliest positive 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

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, 2, 3, 2, 1, 1, 3, 3, 1, 1, 1
Offset: 0

Views

Author

M. F. Hasler, Oct 10 2014

Keywords

Comments

See A248625 for more information, links and examples.
It is a variation of A229037 where 3-term is replaced by 4-term (and with “lead index” 0 instead of 1)

Crossrefs

Programs

  • PARI
    a=[];for(n=1,190,a=concat(a,1);while(hasAP(a,4),a[#a]++));a \\ See A248625 for hasAP().
    
  • 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:
                   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
    # Sébastien Palcoux, Aug 28 2019

A368795 Lexicographically earliest sequence of nonnegative integers such that the doubly-infinite symmetric sequence b defined by b(n) = b(-n) = a(n) for any n >= 0 has no three equidistant terms in arithmetic progression.

Original entry on oeis.org

0, 1, 1, 2, 4, 2, 2, 1, 1, 4, 2, 4, 5, 5, 9, 3, 3, 5, 5, 10, 5, 4, 7, 3, 2, 8, 6, 2, 4, 2, 4, 7, 2, 3, 6, 5, 11, 1, 7, 15, 9, 6, 12, 10, 13, 10, 2, 13, 11, 8, 17, 9, 10, 13, 14, 1, 10, 11, 17, 15, 12, 1, 1, 5, 12, 11, 5, 6, 1, 17, 3, 15, 6, 6, 7, 6, 6, 17, 25
Offset: 0

Views

Author

Rémy Sigrist, Jan 06 2024

Keywords

Comments

This sequence is a variant of A229037 and A248625 with similar graphical features.

Examples

			For n = 4:
- the first 4 terms of the sequence are: 0, 1, 1, 2,
- a(4) cannot equal 0 due to the progression b(-4) = 0, b(0) = 0, b(4) = 0,
- a(4) cannot equal 1 due to the progression b(-2) = 1, b(1) = 1, b(4) = 1,
- a(4) cannot equal 2 due to the progression b(0) = 0, b(2) = 1, b(4) = 2,
- a(4) cannot equal 3 due to the progression b(2) = 1, b(3) = 2, b(4) = 3,
- we chose a(4) = 4 as this does not induce arithmetic progressions.
		

Crossrefs

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

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

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0
Offset: 0

Views

Author

M. F. Hasler, Oct 10 2014

Keywords

Comments

See A248625 for more information, links and examples.

Crossrefs

Programs

  • PARI
    a=[];for(n=1,190,a=concat(a,0);while(hasAP(a,5),a[#a]++));a \\ See A248625 for hasAP(). Use concat(a,1) for the "positive integer" variant.
Showing 1-6 of 6 results.