login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A210425 Number of 3-divided words of length n over a 4-letter alphabet. 2

%I #15 Aug 30 2021 10:54:56

%S 0,0,4,60,374,1960,9103,40497,174127,735268,3064477,12664101,52005445,

%T 212595280,866047122

%N Number of 3-divided words of length n over a 4-letter alphabet.

%C See A210109 for further information.

%C Row sums of the following table which shows how many words of length n over a 4-letter alphabet are 3-divided in k>=1 different ways:

%C 4;

%C 41, 14, 5;

%C 147, 111, 67, 29, 14, 6;

%C 594, 358, 381, 211, 156, 128, 80, 28, 17, 7;

%C 2072, 1400, 1433, 875, 821, 669, 588, 369, 340, 240, 163, 72, 33, 20, 8;

%C - _R. J. Mathar_, Mar 25 2012

%o (Python)

%o from itertools import product

%o def is3div(b):

%o for i in range(1, len(b)-1):

%o for j in range(i+1, len(b)):

%o X, Y, Z = b[:i], b[i:j], b[j:]

%o if all(b < bp for bp in [X+Z+Y, Z+Y+X, Y+X+Z, Y+Z+X, Z+X+Y]):

%o return True

%o return False

%o def a(n): return sum(is3div("".join(b)) for b in product("0123", repeat=n))

%o print([a(n) for n in range(1, 9)]) # _Michael S. Branicky_, Aug 30 2021

%Y Cf. A210109, A210426.

%K nonn

%O 1,3

%A _R. J. Mathar_, Mar 21 2012

%E a(12)-a(15) from _Michael S. Branicky_, Aug 30 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 05:56 EDT 2024. Contains 371964 sequences. (Running on oeis4.)