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.

A386987 For n >= 2, a(n) is the least r >= 1 such that T(n - r) + ... + T(n - 1) = T(n + 1) + ... + T(n + r) where T(i) is A010060(i).

Original entry on oeis.org

2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3, 4, 2, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 2, 4, 3, 3
Offset: 2

Views

Author

Ctibor O. Zizka, Aug 12 2025

Keywords

Comments

a(n) is from {1, 2, 3, 4}.

Examples

			For n = 6: T(6 - r) + ... + T(5) = T(7) + ... + T(6 + r) is true for the least r = 4  because A010060(2) + A010060(3) + A010060(4) + A010060(5) = A010060(7) + A010060(8) + A010060(9) + A010060(10), thus a(6) = 4.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Module[{s = 0, r = 1}, While[r <= n && (r == 1 || s != 0), s += (ThueMorse[n - r] - ThueMorse[n + r]); r++]; r-1]; Array[a, 100, 2] (* Amiram Eldar, Aug 12 2025 *)

Formula

a(A081706(n) + 1) = 1.
a(2*A079523(n)) = 2.
a(A249034(n))= 2.
a(A225822(n)) = 3.
a(A056196(n)) = 3.
a(2*A131323(n)) = 4.
a(2*A249034(n) - 1) = 4.