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

This page as a plain text file.
%I A386987 #8 Aug 16 2025 17:37:37
%S A386987 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,
%T A386987 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,
%U A386987 4,3,3,4,2,1,1,2,2,1,1,2,2,1,1,2,4,3,3
%N 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).
%C A386987 a(n) is from {1, 2, 3, 4}.
%F A386987 a(A081706(n) + 1) = 1.
%F A386987 a(2*A079523(n)) = 2.
%F A386987 a(A249034(n))= 2.
%F A386987 a(A225822(n)) = 3.
%F A386987 a(A056196(n)) = 3.
%F A386987 a(2*A131323(n)) = 4.
%F A386987 a(2*A249034(n) - 1) = 4.
%e A386987 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.
%t A386987 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 *)
%Y A386987 Cf. A010060, A056196, A079523, A081706, A131323, A225822, A249034.
%K A386987 nonn
%O A386987 2,1
%A A386987 _Ctibor O. Zizka_, Aug 12 2025