The Verbose versions of the Generalized Quasi-polynomial Capsules for the co\
efficient of q^(m*n+1) mod m
for the unique formal power series satisying thefunctional equation
m
q f(q )
f(q) = 1 + --------
2
(1 - q)
for m from 3 to 20, except those that are 2 mod 4 are as follows
m is, 3
----------------------------------------------------------------------------\
-----------------
A Fast (Log Time!) Way to Determine the Remainder Upon Dividing by, 3,
(3 n + 1)
of the coefficient of, q
in the Unique Formal Power Series Satisfying the Functional Equation
3
q f(q )
f(q) = 1 + -------
2
-q + 1
By Shalosh B. Ekhad
Theorem: Let c(n) be the coefficient of q^n in the formal power series of th\
e title, in other words let
infinity
-----
\ n
f(q) = ) c(n) q
/
-----
n = 0
is the unique formal power series satisfying the inhomogeneneous functional \
equation:
3
q f(q )
f(q) = 1 + -------
2
-q + 1
Let , d(n), be , c(3 n + 1)
Define , 4, integers as follows:
C[0] = 0, C[1] = 1, C[2] = 0, C[3] = 2
If j is larger then, 3, then C[j]=0
Also let Q(n) be the quasi-polynomial of quasi-period, 2, such that
if n modulo, 2, is , 0, then Q(n) equals , 1
if n modulo, 2, is , 1, then Q(n) equals , 0
d(n) modulo, 3, can be computed VERY fast (in logarithmic time!) using the fo\
llowing recurrence, taken modulo, 3
d(3 n + a) = Q(3 n + a) + C[a] d(n) + C[a + 3] d(n - 1)
subject to the initial condition
d(0) = 1, d(1) = 1, d(2) = 1, d(3) = 2
Just for fun the googol-th through googol+100-th terms of d(n) modulo, 3, is
1, 2, 2, 0, 0, 1, 1, 2, 0, 0, 2, 1, 1, 2, 1, 0, 1, 1, 1, 2, 1, 0, 1, 1, 1, 2, 1,
0, 1, 1, 1, 2, 1, 0, 1, 1, 1, 2, 0, 0, 2, 1, 1, 2, 2, 0, 0, 2, 1, 1, 1, 0,
1, 0, 1, 0, 2, 0, 0, 1, 1, 2, 0, 0, 2, 0, 1, 0, 1, 0, 1, 2, 1, 1, 0, 0, 2,
1, 1, 2, 2, 0, 0, 1, 1, 2, 1, 0, 1, 1, 1, 2, 1, 0, 1, 1, 1, 2, 1, 0, 1
----------------------------------------------------------------------------\
-----------------
This took, 0.038, seconds,
----------------------------------------------------------------------------\
-----------------
m is, 4
FAIL
m is, 5
----------------------------------------------------------------------------\
-----------------
A Fast (Log Time!) Way to Determine the Remainder Upon Dividing by, 5,
(5 n + 1)
of the coefficient of, q
in the Unique Formal Power Series Satisfying the Functional Equation
5
q f(q )
f(q) = 1 + -------
2
-q + 1
By Shalosh B. Ekhad
Theorem: Let c(n) be the coefficient of q^n in the formal power series of th\
e title, in other words let
infinity
-----
\ n
f(q) = ) c(n) q
/
-----
n = 0
is the unique formal power series satisfying the inhomogeneneous functional \
equation:
5
q f(q )
f(q) = 1 + -------
2
-q + 1
Let , d(n), be , c(5 n + 1)
Define , 8, integers as follows:
C[0] = 0, C[1] = 1, C[2] = 0, C[3] = 2, C[4] = 0, C[5] = 3, C[6] = 0, C[7] = 4
If j is larger then, 7, then C[j]=0
Also let Q(n) be the quasi-polynomial of quasi-period, 2, such that
if n modulo, 2, is , 0, then Q(n) equals , 1
if n modulo, 2, is , 1, then Q(n) equals , 0
d(n) modulo, 5, can be computed VERY fast (in logarithmic time!) using the fo\
llowing recurrence, taken modulo, 5
d(5 n + a) = Q(5 n + a) + C[a] d(n) + C[a + 5] d(n - 1)
subject to the initial condition
d(0) = 1, d(1) = 1, d(2) = 1, d(3) = 2, d(4) = 1, d(5) = 3, d(6) = 2, d(7) = 4
Just for fun the googol-th through googol+100-th terms of d(n) modulo, 5, is
1, 1, 1, 2, 1, 3, 2, 4, 3, 0, 4, 1, 0, 2, 1, 3, 3, 4, 0, 0, 2, 1, 4, 2, 1, 3, 4,
4, 2, 0, 0, 2, 3, 4, 1, 1, 0, 3, 4, 0, 3, 3, 2, 1, 1, 4, 1, 2, 1, 0, 1, 4,
1, 3, 1, 2, 2, 1, 3, 0, 4, 0, 0, 0, 1, 0, 3, 0, 0, 0, 2, 1, 4, 2, 1, 3, 4,
4, 2, 0, 0, 3, 3, 1, 1, 4, 0, 2, 4, 0, 3, 0, 2, 0, 1, 0, 1, 0, 1, 0, 1
----------------------------------------------------------------------------\
-----------------
This took, 0.017, seconds,
----------------------------------------------------------------------------\
-----------------
m is, 6
FAIL
m is, 7
----------------------------------------------------------------------------\
-----------------
A Fast (Log Time!) Way to Determine the Remainder Upon Dividing by, 7,
(7 n + 1)
of the coefficient of, q
in the Unique Formal Power Series Satisfying the Functional Equation
7
q f(q )
f(q) = 1 + -------
2
-q + 1
By Shalosh B. Ekhad
Theorem: Let c(n) be the coefficient of q^n in the formal power series of th\
e title, in other words let
infinity
-----
\ n
f(q) = ) c(n) q
/
-----
n = 0
is the unique formal power series satisfying the inhomogeneneous functional \
equation:
7
q f(q )
f(q) = 1 + -------
2
-q + 1
Let , d(n), be , c(7 n + 1)
Define , 12, integers as follows:
C[0] = 0, C[1] = 1, C[2] = 0, C[3] = 2, C[4] = 0, C[5] = 3, C[6] = 0, C[7] = 4,
C[8] = 0, C[9] = 5, C[10] = 0, C[11] = 6
If j is larger then, 11, then C[j]=0
Also let Q(n) be the quasi-polynomial of quasi-period, 2, such that
if n modulo, 2, is , 0, then Q(n) equals , 1
if n modulo, 2, is , 1, then Q(n) equals , 0
d(n) modulo, 7, can be computed VERY fast (in logarithmic time!) using the fo\
llowing recurrence, taken modulo, 7
d(7 n + a) = Q(7 n + a) + C[a] d(n) + C[a + 7] d(n - 1)
subject to the initial condition
d(0) = 1, d(1) = 1, d(2) = 1, d(3) = 2, d(4) = 1, d(5) = 3, d(6) = 1, d(7) = 4,
d(8) = 2, d(9) = 5, d(10) = 3, d(11) = 6
Just for fun the googol-th through googol+100-th terms of d(n) modulo, 7, is
3, 5, 5, 6, 0, 0, 2, 1, 4, 2, 6, 3, 1, 4, 4, 5, 0, 6, 3, 0, 6, 1, 2, 2, 5, 3, 1,
4, 5, 5, 2, 6, 6, 0, 3, 1, 0, 2, 4, 3, 1, 4, 6, 5, 4, 6, 2, 0, 0, 1, 5, 2,
3, 3, 1, 4, 0, 5, 6, 6, 5, 0, 4, 1, 3, 2, 2, 3, 1, 4, 1, 5, 1, 6, 1, 0, 1,
1, 1, 2, 1, 3, 1, 4, 6, 5, 4, 6, 2, 0, 0, 1, 5, 2, 3, 3, 1, 4, 4, 5, 0
----------------------------------------------------------------------------\
-----------------
This took, 0.017, seconds,
----------------------------------------------------------------------------\
-----------------
m is, 8
FAIL
m is, 9
----------------------------------------------------------------------------\
-----------------
A Fast (Log Time!) Way to Determine the Remainder Upon Dividing by, 9,
(9 n + 1)
of the coefficient of, q
in the Unique Formal Power Series Satisfying the Functional Equation
9
q f(q )
f(q) = 1 + -------
2
-q + 1
By Shalosh B. Ekhad
Theorem: Let c(n) be the coefficient of q^n in the formal power series of th\
e title, in other words let
infinity
-----
\ n
f(q) = ) c(n) q
/
-----
n = 0
is the unique formal power series satisfying the inhomogeneneous functional \
equation:
9
q f(q )
f(q) = 1 + -------
2
-q + 1
Let , d(n), be , c(9 n + 1)
Define , 16, integers as follows:
C[0] = 0, C[1] = 1, C[2] = 0, C[3] = 2, C[4] = 0, C[5] = 3, C[6] = 0, C[7] = 4,
C[8] = 0, C[9] = 5, C[10] = 0, C[11] = 6, C[12] = 0, C[13] = 7, C[14] = 0,
C[15] = 8
If j is larger then, 15, then C[j]=0
Also let Q(n) be the quasi-polynomial of quasi-period, 2, such that
if n modulo, 2, is , 0, then Q(n) equals , 1
if n modulo, 2, is , 1, then Q(n) equals , 0
d(n) modulo, 9, can be computed VERY fast (in logarithmic time!) using the fo\
llowing recurrence, taken modulo, 9
d(9 n + a) = Q(9 n + a) + C[a] d(n) + C[a + 9] d(n - 1)
subject to the initial condition
d(0) = 1, d(1) = 1, d(2) = 1, d(3) = 2, d(4) = 1, d(5) = 3, d(6) = 1, d(7) = 4,
d(8) = 1, d(9) = 5, d(10) = 2, d(11) = 6, d(12) = 3, d(13) = 7, d(14) = 4,
d(15) = 8
Just for fun the googol-th through googol+100-th terms of d(n) modulo, 9, is
7, 8, 5, 3, 3, 7, 1, 2, 6, 6, 2, 1, 7, 5, 3, 0, 8, 0, 4, 0, 0, 0, 5, 0, 1, 0, 4,
0, 7, 0, 1, 0, 4, 0, 7, 5, 1, 1, 4, 6, 7, 2, 1, 7, 2, 3, 3, 8, 4, 4, 5, 0,
6, 1, 7, 2, 8, 3, 0, 4, 1, 5, 0, 6, 8, 7, 7, 8, 6, 0, 5, 4, 4, 8, 3, 3, 2,
7, 1, 2, 7, 6, 4, 1, 1, 5, 7, 0, 4, 7, 1, 5, 7, 3, 4, 1, 1, 8, 5, 6, 0
----------------------------------------------------------------------------\
-----------------
This took, 0.017, seconds,
----------------------------------------------------------------------------\
-----------------
m is, 10
FAIL
m is, 11
----------------------------------------------------------------------------\
-----------------
A Fast (Log Time!) Way to Determine the Remainder Upon Dividing by, 11,
(11 n + 1)
of the coefficient of, q
in the Unique Formal Power Series Satisfying the Functional Equation
11
q f(q )
f(q) = 1 + --------
2
-q + 1
By Shalosh B. Ekhad
Theorem: Let c(n) be the coefficient of q^n in the formal power series of th\
e title, in other words let
infinity
-----
\ n
f(q) = ) c(n) q
/
-----
n = 0
is the unique formal power series satisfying the inhomogeneneous functional \
equation:
11
q f(q )
f(q) = 1 + --------
2
-q + 1
Let , d(n), be , c(11 n + 1)
Define , 20, integers as follows:
C[0] = 0, C[1] = 1, C[2] = 0, C[3] = 2, C[4] = 0, C[5] = 3, C[6] = 0, C[7] = 4,
C[8] = 0, C[9] = 5, C[10] = 0, C[11] = 6, C[12] = 0, C[13] = 7, C[14] = 0,
C[15] = 8, C[16] = 0, C[17] = 9, C[18] = 0, C[19] = 10
If j is larger then, 19, then C[j]=0
Also let Q(n) be the quasi-polynomial of quasi-period, 2, such that
if n modulo, 2, is , 0, then Q(n) equals , 1
if n modulo, 2, is , 1, then Q(n) equals , 0
d(n) modulo, 11, can be computed VERY fast (in logarithmic time!) using the f\
ollowing recurrence, taken modulo, 11
d(11 n + a) = Q(11 n + a) + C[a] d(n) + C[a + 11] d(n - 1)
subject to the initial condition
d(0) = 1, d(1) = 1, d(2) = 1, d(3) = 2, d(4) = 1, d(5) = 3, d(6) = 1, d(7) = 4,
d(8) = 1, d(9) = 5, d(10) = 1, d(11) = 6, d(12) = 2, d(13) = 7, d(14) = 3,
d(15) = 8, d(16) = 4, d(17) = 9, d(18) = 5, d(19) = 10
Just for fun the googol-th through googol+100-th terms of d(n) modulo, 11, is
8, 1, 9, 7, 10, 2, 0, 8, 1, 3, 1, 9, 1, 4, 1, 10, 1, 5, 1, 0, 1, 7, 1, 3, 1, 10,
1, 6, 1, 2, 1, 9, 6, 5, 0, 1, 5, 8, 10, 4, 4, 0, 9, 8, 3, 5, 8, 2, 2, 10, 7,
7, 1, 4, 0, 1, 10, 9, 9, 6, 8, 3, 7, 0, 6, 9, 5, 7, 4, 5, 3, 3, 2, 1, 1, 10,
5, 8, 9, 6, 2, 4, 6, 2, 10, 0, 3, 10, 7, 9, 0, 8, 4, 7, 8, 6, 1, 5, 10, 4,
8
----------------------------------------------------------------------------\
-----------------
This took, 0.021, seconds,
----------------------------------------------------------------------------\
-----------------
m is, 12
FAIL
m is, 13
----------------------------------------------------------------------------\
-----------------
A Fast (Log Time!) Way to Determine the Remainder Upon Dividing by, 13,
(13 n + 1)
of the coefficient of, q
in the Unique Formal Power Series Satisfying the Functional Equation
13
q f(q )
f(q) = 1 + --------
2
-q + 1
By Shalosh B. Ekhad
Theorem: Let c(n) be the coefficient of q^n in the formal power series of th\
e title, in other words let
infinity
-----
\ n
f(q) = ) c(n) q
/
-----
n = 0
is the unique formal power series satisfying the inhomogeneneous functional \
equation:
13
q f(q )
f(q) = 1 + --------
2
-q + 1
Let , d(n), be , c(13 n + 1)
Define , 24, integers as follows:
C[0] = 0, C[1] = 1, C[2] = 0, C[3] = 2, C[4] = 0, C[5] = 3, C[6] = 0, C[7] = 4,
C[8] = 0, C[9] = 5, C[10] = 0, C[11] = 6, C[12] = 0, C[13] = 7, C[14] = 0,
C[15] = 8, C[16] = 0, C[17] = 9, C[18] = 0, C[19] = 10, C[20] = 0,
C[21] = 11, C[22] = 0, C[23] = 12
If j is larger then, 23, then C[j]=0
Also let Q(n) be the quasi-polynomial of quasi-period, 2, such that
if n modulo, 2, is , 0, then Q(n) equals , 1
if n modulo, 2, is , 1, then Q(n) equals , 0
d(n) modulo, 13, can be computed VERY fast (in logarithmic time!) using the f\
ollowing recurrence, taken modulo, 13
d(13 n + a) = Q(13 n + a) + C[a] d(n) + C[a + 13] d(n - 1)
subject to the initial condition
d(0) = 1, d(1) = 1, d(2) = 1, d(3) = 2, d(4) = 1, d(5) = 3, d(6) = 1, d(7) = 4,
d(8) = 1, d(9) = 5, d(10) = 1, d(11) = 6, d(12) = 1, d(13) = 7, d(14) = 2,
d(15) = 8, d(16) = 3, d(17) = 9, d(18) = 4, d(19) = 10, d(20) = 5,
d(21) = 11, d(22) = 6, d(23) = 12
Just for fun the googol-th through googol+100-th terms of d(n) modulo, 13, is
10, 10, 7, 6, 4, 2, 1, 11, 5, 7, 9, 3, 0, 12, 4, 8, 8, 4, 12, 0, 3, 4, 7, 8, 11,
12, 2, 3, 6, 7, 10, 11, 1, 2, 12, 6, 10, 10, 8, 1, 6, 5, 4, 9, 2, 0, 0, 12,
11, 11, 9, 10, 7, 9, 5, 8, 3, 7, 1, 6, 6, 5, 11, 4, 3, 3, 8, 2, 0, 1, 5, 0,
10, 7, 2, 1, 7, 8, 12, 2, 4, 9, 9, 3, 1, 10, 0, 4, 12, 11, 11, 5, 10, 12, 9,
6, 8, 0, 7, 2, 6
----------------------------------------------------------------------------\
-----------------
This took, 0.023, seconds,
----------------------------------------------------------------------------\
-----------------
m is, 14
FAIL
m is, 15
----------------------------------------------------------------------------\
-----------------
A Fast (Log Time!) Way to Determine the Remainder Upon Dividing by, 15,
(15 n + 1)
of the coefficient of, q
in the Unique Formal Power Series Satisfying the Functional Equation
15
q f(q )
f(q) = 1 + --------
2
-q + 1
By Shalosh B. Ekhad
Theorem: Let c(n) be the coefficient of q^n in the formal power series of th\
e title, in other words let
infinity
-----
\ n
f(q) = ) c(n) q
/
-----
n = 0
is the unique formal power series satisfying the inhomogeneneous functional \
equation:
15
q f(q )
f(q) = 1 + --------
2
-q + 1
Let , d(n), be , c(15 n + 1)
Define , 28, integers as follows:
C[0] = 0, C[1] = 1, C[2] = 0, C[3] = 2, C[4] = 0, C[5] = 3, C[6] = 0, C[7] = 4,
C[8] = 0, C[9] = 5, C[10] = 0, C[11] = 6, C[12] = 0, C[13] = 7, C[14] = 0,
C[15] = 8, C[16] = 0, C[17] = 9, C[18] = 0, C[19] = 10, C[20] = 0,
C[21] = 11, C[22] = 0, C[23] = 12, C[24] = 0, C[25] = 13, C[26] = 0,
C[27] = 14
If j is larger then, 27, then C[j]=0
Also let Q(n) be the quasi-polynomial of quasi-period, 2, such that
if n modulo, 2, is , 0, then Q(n) equals , 1
if n modulo, 2, is , 1, then Q(n) equals , 0
d(n) modulo, 15, can be computed VERY fast (in logarithmic time!) using the f\
ollowing recurrence, taken modulo, 15
d(15 n + a) = Q(15 n + a) + C[a] d(n) + C[a + 15] d(n - 1)
subject to the initial condition
d(0) = 1, d(1) = 1, d(2) = 1, d(3) = 2, d(4) = 1, d(5) = 3, d(6) = 1, d(7) = 4,
d(8) = 1, d(9) = 5, d(10) = 1, d(11) = 6, d(12) = 1, d(13) = 7, d(14) = 1,
d(15) = 8, d(16) = 2, d(17) = 9, d(18) = 3, d(19) = 10, d(20) = 4,
d(21) = 11, d(22) = 5, d(23) = 12, d(24) = 6, d(25) = 13, d(26) = 7,
d(27) = 14
Just for fun the googol-th through googol+100-th terms of d(n) modulo, 15, is
13, 7, 12, 9, 11, 11, 10, 13, 9, 0, 8, 1, 7, 2, 6, 3, 5, 4, 4, 5, 3, 6, 2, 7, 1,
8, 2, 9, 3, 10, 4, 11, 5, 12, 6, 13, 7, 14, 8, 0, 9, 1, 10, 2, 11, 3, 12, 4,
13, 5, 14, 6, 0, 7, 1, 8, 4, 9, 7, 10, 10, 11, 13, 12, 1, 13, 4, 14, 7, 0,
10, 1, 13, 2, 1, 3, 4, 4, 7, 5, 10, 6, 13, 7, 1, 8, 6, 9, 11, 10, 1, 11, 6,
12, 11, 13, 1, 14, 6, 0, 11
----------------------------------------------------------------------------\
-----------------
This took, 0.023, seconds,
----------------------------------------------------------------------------\
-----------------
m is, 16
FAIL
m is, 17
----------------------------------------------------------------------------\
-----------------
A Fast (Log Time!) Way to Determine the Remainder Upon Dividing by, 17,
(17 n + 1)
of the coefficient of, q
in the Unique Formal Power Series Satisfying the Functional Equation
17
q f(q )
f(q) = 1 + --------
2
-q + 1
By Shalosh B. Ekhad
Theorem: Let c(n) be the coefficient of q^n in the formal power series of th\
e title, in other words let
infinity
-----
\ n
f(q) = ) c(n) q
/
-----
n = 0
is the unique formal power series satisfying the inhomogeneneous functional \
equation:
17
q f(q )
f(q) = 1 + --------
2
-q + 1
Let , d(n), be , c(17 n + 1)
Define , 32, integers as follows:
C[0] = 0, C[1] = 1, C[2] = 0, C[3] = 2, C[4] = 0, C[5] = 3, C[6] = 0, C[7] = 4,
C[8] = 0, C[9] = 5, C[10] = 0, C[11] = 6, C[12] = 0, C[13] = 7, C[14] = 0,
C[15] = 8, C[16] = 0, C[17] = 9, C[18] = 0, C[19] = 10, C[20] = 0,
C[21] = 11, C[22] = 0, C[23] = 12, C[24] = 0, C[25] = 13, C[26] = 0,
C[27] = 14, C[28] = 0, C[29] = 15, C[30] = 0, C[31] = 16
If j is larger then, 31, then C[j]=0
Also let Q(n) be the quasi-polynomial of quasi-period, 2, such that
if n modulo, 2, is , 0, then Q(n) equals , 1
if n modulo, 2, is , 1, then Q(n) equals , 0
d(n) modulo, 17, can be computed VERY fast (in logarithmic time!) using the f\
ollowing recurrence, taken modulo, 17
d(17 n + a) = Q(17 n + a) + C[a] d(n) + C[a + 17] d(n - 1)
subject to the initial condition
d(0) = 1, d(1) = 1, d(2) = 1, d(3) = 2, d(4) = 1, d(5) = 3, d(6) = 1, d(7) = 4,
d(8) = 1, d(9) = 5, d(10) = 1, d(11) = 6, d(12) = 1, d(13) = 7, d(14) = 1,
d(15) = 8, d(16) = 1, d(17) = 9, d(18) = 2, d(19) = 10, d(20) = 3,
d(21) = 11, d(22) = 4, d(23) = 12, d(24) = 5, d(25) = 13, d(26) = 6,
d(27) = 14, d(28) = 7, d(29) = 15, d(30) = 8, d(31) = 16
Just for fun the googol-th through googol+100-th terms of d(n) modulo, 17, is
14, 0, 15, 0, 16, 0, 0, 0, 1, 0, 10, 0, 2, 0, 11, 0, 3, 0, 12, 0, 4, 0, 13, 0,
5, 0, 14, 12, 6, 7, 15, 2, 7, 14, 16, 9, 8, 4, 0, 16, 9, 11, 1, 6, 1, 1, 1,
13, 1, 8, 1, 3, 1, 15, 1, 10, 1, 5, 1, 0, 1, 7, 1, 14, 1, 4, 1, 11, 1, 1, 1,
8, 1, 15, 1, 5, 1, 12, 10, 2, 2, 9, 11, 16, 3, 6, 12, 13, 4, 3, 13, 10, 5,
0, 14, 2, 6, 4, 15, 6, 7
----------------------------------------------------------------------------\
-----------------
This took, 0.043, seconds,
----------------------------------------------------------------------------\
-----------------
m is, 18
FAIL
m is, 19
----------------------------------------------------------------------------\
-----------------
A Fast (Log Time!) Way to Determine the Remainder Upon Dividing by, 19,
(19 n + 1)
of the coefficient of, q
in the Unique Formal Power Series Satisfying the Functional Equation
19
q f(q )
f(q) = 1 + --------
2
-q + 1
By Shalosh B. Ekhad
Theorem: Let c(n) be the coefficient of q^n in the formal power series of th\
e title, in other words let
infinity
-----
\ n
f(q) = ) c(n) q
/
-----
n = 0
is the unique formal power series satisfying the inhomogeneneous functional \
equation:
19
q f(q )
f(q) = 1 + --------
2
-q + 1
Let , d(n), be , c(19 n + 1)
Define , 36, integers as follows:
C[0] = 0, C[1] = 1, C[2] = 0, C[3] = 2, C[4] = 0, C[5] = 3, C[6] = 0, C[7] = 4,
C[8] = 0, C[9] = 5, C[10] = 0, C[11] = 6, C[12] = 0, C[13] = 7, C[14] = 0,
C[15] = 8, C[16] = 0, C[17] = 9, C[18] = 0, C[19] = 10, C[20] = 0,
C[21] = 11, C[22] = 0, C[23] = 12, C[24] = 0, C[25] = 13, C[26] = 0,
C[27] = 14, C[28] = 0, C[29] = 15, C[30] = 0, C[31] = 16, C[32] = 0,
C[33] = 17, C[34] = 0, C[35] = 18
If j is larger then, 35, then C[j]=0
Also let Q(n) be the quasi-polynomial of quasi-period, 2, such that
if n modulo, 2, is , 0, then Q(n) equals , 1
if n modulo, 2, is , 1, then Q(n) equals , 0
d(n) modulo, 19, can be computed VERY fast (in logarithmic time!) using the f\
ollowing recurrence, taken modulo, 19
d(19 n + a) = Q(19 n + a) + C[a] d(n) + C[a + 19] d(n - 1)
subject to the initial condition
d(0) = 1, d(1) = 1, d(2) = 1, d(3) = 2, d(4) = 1, d(5) = 3, d(6) = 1, d(7) = 4,
d(8) = 1, d(9) = 5, d(10) = 1, d(11) = 6, d(12) = 1, d(13) = 7, d(14) = 1,
d(15) = 8, d(16) = 1, d(17) = 9, d(18) = 1, d(19) = 10, d(20) = 2,
d(21) = 11, d(22) = 3, d(23) = 12, d(24) = 4, d(25) = 13, d(26) = 5,
d(27) = 14, d(28) = 6, d(29) = 15, d(30) = 7, d(31) = 16, d(32) = 8,
d(33) = 17, d(34) = 9, d(35) = 18
Just for fun the googol-th through googol+100-th terms of d(n) modulo, 19, is
1, 18, 3, 16, 5, 14, 7, 12, 9, 10, 11, 8, 13, 6, 15, 4, 17, 2, 0, 0, 2, 14, 4,
9, 6, 4, 8, 18, 10, 13, 12, 8, 14, 3, 16, 17, 18, 12, 1, 7, 17, 2, 14, 16,
11, 11, 8, 6, 5, 1, 2, 15, 18, 10, 15, 5, 12, 0, 9, 11, 6, 3, 3, 14, 0, 6,
16, 17, 13, 9, 10, 1, 7, 12, 4, 4, 1, 15, 12, 7, 4, 18, 15, 10, 7, 2, 18,
13, 10, 5, 2, 16, 13, 8, 5, 0, 16, 8, 8, 16, 0
----------------------------------------------------------------------------\
-----------------
This took, 0.031, seconds,
----------------------------------------------------------------------------\
-----------------
m is, 20
FAIL
This took, 0.274, seconds.