login
Number of length-n ternary sequences where the sum of each block differs by at most 1 from every other block of the same length.
1

%I #11 Oct 11 2022 14:10:58

%S 1,3,7,15,27,47,71,107,151,207,271,355,447,563,691,835,995,1187,1391,

%T 1631,1887,2167,2467,2811,3171,3571,3995,4455,4939,5479,6035,6651,

%U 7299,7987,8707,9475,10267,11131,12031,12979,13959,15019,16103,17271,18479,19735

%N Number of length-n ternary sequences where the sum of each block differs by at most 1 from every other block of the same length.

%F a(n) = 2*A005598(n) - 1. - _Rémy Sigrist_, Oct 11 2022

%e For n = 2 the only strings omitted are 02 and 20.

%Y Cf. A005598, which is the analogous sequence where "ternary" is replaced by "binary".

%Y Cf. A274005, which is the analogous sequence where "ternary" is replaced by "binary" and "1" is replaced by "2".

%K nonn

%O 0,2

%A _Jeffrey Shallit_, Jun 06 2016

%E More terms from _Rémy Sigrist_, Oct 11 2022