login
a(1) = 1, a(n+1) as the smallest positive integer greater than a(n) that avoids violating the condition a(k) + a(k+1) + a(k+2) + a(k+3) is not term.
1

%I #24 May 21 2026 19:20:04

%S 1,2,3,4,5,6,7,8,9,11,12,13,15,16,17,19,20,21,23,24,25,27,28,29,31,32,

%T 33,34,36,37,38,39,41,42,43,44,46,47,48,49,50,52,53,54,55,57,58,59,60,

%U 62,63,64,65,66,68,69,70,71,73,74,75,76,78,79,80,81,82,84,85,86,87,89,90,91,92,94,95,96,97,98

%N a(1) = 1, a(n+1) as the smallest positive integer greater than a(n) that avoids violating the condition a(k) + a(k+1) + a(k+2) + a(k+3) is not term.

%C Conjecture 1: a(n) <= floor((5*n-1)/4).

%C Conjecture 2: The sequence L(k)=16^(k-1) + 3 describes the number of consecutive terms that match the formula a(n) = floor((5*n-1)/4): (Start)

%C [a(1)..a(4)] : L(1) = 16^(1-1) + 3 = 4

%C [a(22)..a(40)] : L(2) = 16^(2-1) + 3 = 19

%C [a(359)..a(617)] : L(3) = 16^(3-1) + 3 = 259

%C [a(5735)..a(9833)] : L(4) = 16^(4-1) + 3 = 4099

%C [a(91751)..a(157289)] : L(5) = 16^(5-1) + 3 = 65539

%C ... (End).

%o (PARI)

%o a_seq(N) = {my(a = [1], used = Set([1]), forb = Set([]), maxv = 3); while(#a < N, my(cand = a[#a] + 1); while(1, if( setsearch(used, cand)==0 && setsearch(forb, cand)==0, break); cand++; ); a = concat(a, cand); used = setunion(used, [cand]); my(m = #a); if(m >= 4, my(s = a[m-3] + a[m-2] + a[m-1] + a[m]); forb = setunion(forb, [s]); ); if(m >= 3, my(s = a[m-2] + a[m-1] + a[m] + (m+1 <= N)); ); if(m >= 1 && m+1 <= N && m+2 <= N && m+3 <= N, 0); ); a; };

%o A394676 = a_seq(1000);

%o vector(100, n, A394676[n])

%Y Cf. A047201.

%K nonn

%O 1,2

%A _Hoang Xuan Thanh_, May 11 2026