login
A239333
Number of n X 1 0..3 arrays with no element equal to one plus the sum of elements to its left or three plus the sum of elements above it, modulo 4.
13
1, 2, 5, 12, 28, 66, 156, 368, 868, 2048, 4832, 11400, 26896, 63456, 149712, 353216, 833344, 1966112, 4638656, 10944000, 25820224, 60917760, 143723520, 339087488, 800010496, 1887468032, 4453111040, 10506243072, 24787422208, 58481066496, 137974619136, 325524082688
OFFSET
0,2
COMMENTS
Number of n-length words on {0,1,2} in which 0 appears only in runs of length 2. - Milan Janjic, Feb 14 2015
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000 (terms n = 1..210 from R. H. Hardin)
D. Birmajer, J. B. Gil, and M. D. Weiner, On the Enumeration of Restricted Words over a Finite Alphabet, J. Int. Seq. 19 (2016) # 16.1.3, example 10.
FORMULA
a(n) = 2*a(n-1) + 2*a(n-3).
a(n) = A052912(n) + A052912(n-2) for n>=2. - R. J. Mathar, Jun 18 2015
G.f.: (1 + x^2) / (1 - 2*x - 2*x^3). - Colin Barker, Feb 18 2018
EXAMPLE
Some solutions for n=5:
..0....2....2....2....0....0....0....0....2....2....2....2....2....0....2....2
..2....0....2....0....2....0....2....0....0....0....0....2....2....2....0....3
..2....2....2....3....2....2....3....0....2....2....3....0....0....0....3....2
..0....0....0....2....2....2....2....0....2....2....3....0....2....0....2....3
..2....2....2....0....2....0....0....0....3....0....2....2....3....2....3....2
MAPLE
a:= n-> (<<0|1|0>, <0|0|1>, <2|0|2>>^n. <<1, 2, 5>>)[1, 1]:
seq(a(n), n=0..31); # Alois P. Heinz, Feb 28 2026
MATHEMATICA
RecurrenceTable[{a[0] == 1, a[1] == 2, a[2]== 5, a[n] == 2 a[n - 1] + 2 a[n - 3]}, a[n], {n, 0, 29}] (* Milan Janjic, Feb 14 2015 *)
PROG
(PARI) Vec(-(x^2+1)/(2*x^3+2*x-1) + O(x^100)) \\ Colin Barker, Feb 15 2015
CROSSREFS
Column k=1 of A239340.
Sequence in context: A297496 A302020 A255115 * A166297 A024960 A291234
KEYWORD
nonn,easy
AUTHOR
R. H. Hardin, Mar 16 2014
EXTENSIONS
a(0)=1 prepended by Alois P. Heinz, Feb 27 2026
Content from A255115 moved into this page by Alois P. Heinz, Feb 28 2026
STATUS
approved