login
A394576
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) is not term.
1
1, 2, 3, 4, 5, 7, 8, 10, 11, 13, 14, 15, 17, 18, 19, 21, 22, 23, 24, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 39, 40, 41, 43, 44, 45, 47, 48, 49, 51, 52, 53, 55, 56, 57, 59, 60, 61, 63, 64, 65, 67, 68, 70, 71, 72, 74, 75, 76, 78, 79, 80, 82, 83, 84, 86, 87, 88, 90, 91, 92, 94, 95, 97, 98, 99
OFFSET
1,2
COMMENTS
Conjecture 1: a(n) <= floor((4*n-1)/3).
Conjecture 2: The sequence L(k) = 9^(k-1) + 2 describes the number of consecutive terms that match the formula a(n) = floor((4*n-1)/3) : (Start)
[a(1)..a(3)] : L(1) = 9^(1-1) + 2 = 3
[a(8)..a(18)] : L(2) = 9^(2-1) + 2 = 11
[a(71)..a(153)] : L(3) = 9^(3-1) + 2 = 83
[a(908)..a(1638)] : L(4) = 9^(4-1) + 2 = 731
[a(5741)..a(12303)] : L(5) = 9^(5-1) + 2 = 6563
[a(51668)..a(110718)] : L(6) = 9^(6-1) + 2 = 59051
[a(465011)..a(996453)] : L(7) = 9^(7-1) + 2 = 531443
... (End).
PROG
(PARI)
a_seq(N) = {my(a = [1], used = Set([1]), forb = Set([]), maxv = 2); 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 >= 3, my(s = a[m-2] + a[m-1] + a[m]); forb = setunion(forb, [s]); ); if(m >= 2, my(s = a[m-1] + a[m] + (m+1 <= N)); ); if(m >= 1 && m+1 <= N && m+2 <= N, 0); ); a; };
A394576 = a_seq(1000);
vector(100, n, A394576[n]) \\ Hoang Xuan Thanh, May 14 2026
CROSSREFS
Cf. A042968.
Sequence in context: A228803 A037014 A261131 * A225061 A133223 A065003
KEYWORD
nonn
AUTHOR
Hoang Xuan Thanh, May 11 2026
STATUS
approved