A258711 Motzkin numbers A001006 read mod 7.
1, 1, 2, 4, 2, 0, 2, 1, 1, 2, 4, 2, 6, 3, 3, 3, 6, 5, 6, 5, 1, 0, 0, 0, 0, 0, 1, 6, 5, 5, 3, 6, 3, 5, 5, 2, 2, 4, 1, 4, 4, 0, 1, 1, 2, 4, 2, 0, 2, 1, 1, 2, 4, 2, 0, 2, 1, 1, 2, 4, 2, 6, 3, 3, 3, 6, 5, 6, 5, 1, 0, 0, 0, 0, 0, 1, 6, 5, 5, 3, 6, 3, 5, 5, 2, 2, 4, 1, 4
Offset: 0
Keywords
Links
- Rob Burns, Structure and asymptotics for Motzkin numbers modulo small primes using automata, arXiv:1612.08146 [math.NT], 2016.
- Anders Hyllengren, Letter to N. J. A. Sloane, Oct 04 1985
Crossrefs
Programs
-
Mathematica
m[0] = 1; m[n_] := m[n] = m[n-1] + Sum[m[k] m[n-k-2], {k, 0, n-2}]; a[n_] := Mod[m[n], 7]; Array[a, 100, 0] (* Jean-François Alcover, Nov 05 2018 *)
-
PARI
a001006(n) = polcoeff((1-x-sqrt((1-x)^2-4*x^2+x^3*O(x^n)))/(2*x^2), n); vector(200, n, n--; a001006(n) % 7) \\ Altug Alkan, Oct 23 2015