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.

A276205 a(0) = a(2) = a(3) = 0. For n>2 a(n) is the smallest nonnegative integer such that there is no arithmetic progression j,k,m,n (of length 4) such that a(j)+a(k)+a(m) = a(n).

Original entry on oeis.org

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

Views

Author

Michal Urbanski, Aug 24 2016

Keywords

Comments

This sequence, unlike A276204 (defined similarly) is seemingly irregular.
a(n) <= n/3. - Robert Israel, Aug 24 2016
The graph (and the definition) are reminiscent of A229037. - N. J. A. Sloane, Aug 29 2016

Examples

			For n = 6 we have that:
a(6)>0, because a(0)+a(2)+a(4)=0 and 0,2,4,6 is an arithmetic progression.
a(6)>1, because a(3)+a(4)+a(5)=1 and 3,4,5,6 is an arithmetic progression.
there is no such arithmetic progression j,k,m,6 that a(j)+a(k)+a(m)=2, so a(6) = 2.
		

Crossrefs

Cf. A276204 (length 3), A276206 (length 5), A276207 (any length).
Cf. also A229037.

Programs

  • Maple
    for i from 0 to 2 do A[i]:= 0 od:
    for n from 3 to 200 do
      Forbid:= {seq(A[n-d]+A[n-2*d]+A[n-3*d],d=1..floor(n/3))};
      A[n]:= min({$0..max(Forbid)+1} minus Forbid)
    od:
    seq(A[i],i=0..200); # Robert Israel, Aug 24 2016

A276206 a(0) = a(1) = a(2) = a(3) = 0. For n>3 a(n) is the smallest nonnegative integer such that there is no arithmetic progression i,j,k,m,n (of length 5) such that a(i)+a(j)+a(k)+a(m) = a(n).

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

Views

Author

Michal Urbanski, Aug 24 2016

Keywords

Comments

The sequence has the same set of values as A051039 (4-Stohr sequence)
Conjecture 1:
One can calculate a(n) in a following, non-recursive way, using the quinary representation of n.
Let n>=0 be an integer. We consider two cases:
1 There is no digit 4 in the quinary representation of n
Then a(n)=0
2 There is a digit 4 in the quinary representation of n
Let i be the number of the position (counting from right) of the rightmost digit 4 in quinary representation of n, then a(n)=A051039(i).
For example let n=22. The quinary representation of 22 is 42. The rightmost digit 4 in the number 42 is on the second position (counting from right), so a(22) = A051039(2) = 2
Conjecture 2:
The sequence can be generated in a following way:
Start with a zero. Take five consecutive copies of all you have, replace all zeros in the fifth copy with the next value of A051039, repeat
Both of these conjectures can be generalized for similarly defined sequences where the length of the arithmetic progression in the definition (in A276206 it is 5) is a prime number, see A276204.
The assumption about primality is essential, for complex lengths of the arithmetic progression the sequence is more irregular, see A276205.

Examples

			For n = 23 we have that:
a(23)>0, because a(3)+a(8)+a(13)+a(18)=0 and 3,8,13,18,23 is an arithmetic progression.
a(23)>1, because a(7)+a(11)+a(15)+a(19)=1 and 7,11,15,19,23 is an arithmetic progression.
There is no such arithmetic progression i,j,k,m,23 that a(i)+a(j)+a(k)+a(m)=2, so a(23) = 2.
		

Crossrefs

Cf. A276204 (length 3), A276205 (length 4), A276207 (any length).
Cf. A051039 (4-Stohr sequence).

A276207 a(0) = a(1) = 0. For n>1 a(n) is the smallest nonnegative integer such that there is no arithmetic progression m_1,m_2,...,m_i,n (2<=i

Original entry on oeis.org

0, 0, 1, 0, 0, 2, 4, 1, 1, 0, 0, 5, 0, 0, 3, 7, 2, 3, 2, 4, 1, 1, 12, 1, 5, 1, 1, 0, 0, 13, 0, 0, 10, 9, 6, 7, 0, 0, 18, 0, 0, 15, 4, 14, 7, 6, 8, 2, 6, 3, 16, 3, 3, 2, 3, 7, 1, 10, 25, 8, 5, 1, 1, 1, 4, 14, 27, 4, 1, 1, 10, 2, 2, 6, 1, 26, 8, 1, 19, 1, 1, 0, 0, 13, 0, 0, 7, 24, 2, 19, 0, 0, 34, 0, 0, 29, 32, 32, 5, 15, 21, 14, 15, 6, 6, 24, 13, 39, 0, 0, 24, 0
Offset: 0

Views

Author

Michal Urbanski, Aug 24 2016

Keywords

Comments

The distribution of zeros is the same as in A276204.

Examples

			For n = 5 we have that:
a(5)>0, because a(3)+a(4)=0 and 3,4,5 is an arithmetic progression
a(5)>1, because a(2)+a(3)+a(4)=1 and 2,3,4,5 is an arithmetic progression
there is no such arithmetic progression m_1,m_2,...,m_i,5 that a(m_1)+a(m_2)+...+a(m_i)=2, so a(5) = 2.
		

Crossrefs

Cf. A276204 (length 3), A276205 (length 4), A276206 (length 5).

A330267 Lexicographically earliest sequence of nonnegative terms such that for any n > 0 and k > 0, a(n+2*k) <> max(a(n), a(n+k)).

Original entry on oeis.org

0, 0, 1, 0, 0, 1, 2, 3, 4, 0, 0, 1, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 2, 3, 10, 11, 0, 0, 1, 0, 0, 1, 12, 13, 4, 0, 0, 1, 0, 0, 1, 6, 5, 4, 7, 8, 9, 14, 15, 6, 16, 10, 5, 17, 11, 10, 7, 8, 3, 2, 5, 2, 3, 18, 19, 20, 21, 3, 2, 12, 2, 3, 13, 22, 2, 11, 2, 10, 23
Offset: 1

Views

Author

Rémy Sigrist, Dec 21 2019

Keywords

Crossrefs

Cf. A003278 (positions of 0's).
See A229037, A268811, A276204, A309890, A317805, A361933, A364057 for similar sequences.
See A330622, A330623 and A330629 for other variants.

Programs

  • C
    See Links section.

Formula

a(n) = 0 iff n belongs to A003278.

A317805 Lexicographically earliest sequence of nonnegative terms such that for any n > 0 and k > 0, a(n) AND a(n + k) <> a(n + 2*k) (where AND denotes the bitwise AND operator).

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 1, 2, 2, 3, 3, 1, 3, 3, 4, 2, 4, 4, 3, 3, 5, 3, 3, 5, 2, 2, 1, 4, 4, 5, 5, 6, 5, 5, 6, 6, 3, 3, 6, 3, 3, 7, 5, 6, 7, 5, 6, 3, 7, 7, 8, 7, 8, 8, 9, 9, 7, 9, 9, 7, 7, 10, 10, 9, 9, 7, 7, 9, 10, 10, 6, 5, 10, 6, 5, 7, 11, 4, 7, 6, 7, 5, 9, 9, 11
Offset: 1

Views

Author

Rémy Sigrist, Aug 07 2018

Keywords

Comments

This sequence has similarities with A276204: here we consider the bitwise AND operator, there the addition operator.
Apparently, the variant where we use the bitwise OR operator corresponds, up to a change of offset, to A289814.
The scatterplot of the sequence has fractal features (see illustrations in Links section).

Examples

			For n = 10:
- a(10-2*1) AND a(10-1) = 2 AND 2 = 2,
- a(10-2*2) AND a(10-2) = 1 AND 2 = 0,
- a(10-2*3) AND a(10-3) = 1 AND 1 = 1,
- a(10-2*4) AND a(10-4) = 0 AND 1 = 0,
- hence a(10) = 3.
		

Crossrefs

A367196 Lexicographically earliest sequence such that for any distinct j, k, m that are the side lengths of a triangle, a(j), a(k), and a(m) are not the side lengths of a triangle.

Original entry on oeis.org

1, 1, 1, 2, 1, 3, 5, 1, 8, 13, 21, 2, 34, 55, 89, 1, 144, 233, 4, 377, 610, 987, 1597, 1, 17, 2584, 4181, 6765, 10946, 17711, 3, 72, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 1, 7, 305, 832040, 1346269, 2178309, 3524578, 41, 5702887, 1292, 9227465
Offset: 1

Views

Author

Neal Gersh Tolunsky, Nov 09 2023

Keywords

Comments

In a triangle, the sum of any two side lengths is greater than that of the third, so that x + y > z. The empty triangle (or line) is not counted, which means that x + y cannot be equal to z. In practice, if we have two side lengths x and y, we can find their sum s and their difference d, which tells us that side z must fall in the range d < z < s to form a triangle.
For n>0, A002620(n+1) gives the number of combinations of three indices whose corresponding terms cannot be the side lengths of a triangle in this sequence.
It appears that the local maxima are the Fibonacci numbers A000045 (except for 1s).
The second-largest values in the log graph, falling roughly on a line, appear to be A001076 (half of the even Fibonacci numbers).
Generalizing the sequence to prohibit the side lengths of any n-gon at distinct n-gonal indices gives A011782.

Examples

			a(3)=1 because the indices 1,2,3 could not be the side lengths of a triangle, so there is no restriction and the smallest number is chosen.
a(7) cannot be 1 because a(3)=1, a(5)=1, and a(7)=1 could be the side lengths of a triangle at indices which are also side lengths of a triangle.
a(7) cannot be 2 because a(4)=2, a(6)=3, and a(7)=2 are side lengths of a triangle at indices that forbid it.
a(7) cannot be 3 because a(5)=1, a(6)=3, and a(7)=3 also make a triangle at indices that forbid it.
a(7) cannot be 4 because a(4)=2, a(6)=3 and a(7)=4 form a triangle at unsuitable indices.
a(7) can be 5 without contradiction, so a(7)=5.
		

Crossrefs

Cf. A316841, A070080 (triangle side lengths).

Programs

  • MATLAB
    See Links.

Extensions

a(11)-a(50) from Samuel Harkness, Nov 13 2023
Showing 1-6 of 6 results.