Notes on Entry 27 of Chapter 25 of Ramanujan's Notebooks, Part IV
From Michael Somos, Dec 08 2009

This refers to Bruce C. Berndt, Ramanujan's Notebooks, Part IV,
Springer-Verlag, 1984

In this case, Ramanujan made a rare innocent
copying error. He knew exactly what was the correct
identity but forgot to copy one term on the left side.

Sequences 1, 2, 3, 4 mentioned below are entries A170773, A170770, A170771 and
A170772 respectively in the OEIS.

/* entry27.gp -- Ramanujan Entry 27 */
\\ 08 Dec 2009 Michael Somos

\\ check an identity
chk(ex)=if(eval(ex)!=1,print(ex" false"))

\\ Ramanujan's f(-q^n)
et(n,oo=oo)=eta(q^n+q*O(q^oo));
\\ Ramanujan's phi(q^n)
rphi(n,oo=oo)=et(2*n,oo)^5/(et(n,oo)*et(4*n,oo))^2;
\\ Ramanujan's psi(q^n)
rpsi(n,oo=oo)=et(2*n,oo)^2/et(n,oo);

\\ product of several phi(q^n) factors
fv(vn,oo=oo)=prod(k=1,#vn,rphi(vn[k],oo));
\\ product of several psi(q^n) factors
gv(vn,oo=oo)=prod(k=1,#vn,rpsi(vn[k],oo));

oo=600;            \\ our infinity

\\ Part IV page 170 Entry 27 Equation (27.1) left side sum
L1=fv([1,7,9,63]);
L2=subst(L1,q,-q);
L3=4*q^4*et(6)^2*et(42)^2;
\\ Ramanujan missed this term accidently (not in Berndt!!)
L4=16*q^20*gv([2,14,18,126]);

L=(L1+L2+L3+L4)/2;

\\ Part IV page 170 Entry 27 Equation (27.1) right side sum
R1=fv([1,63]);
R2=subst(R1,q,-q);
R3=4*q^16*gv([2,126]);

R=(R1+R2+R3)/2;

\\ This validates the corrected identity
chk("L==R^2");

print();print("sequence 1");print();
print("Expansion of ( phi(q) * phi(q^7) * phi(q^9) * phi(q^63) + phi(-q) * phi(-q^7) * phi(-q^9) * phi(-q^63) + 4 * q^4 * f(-q^6)^2 * f(-q^42)^2 + 16 * q^20 * psi(q^2) * psi(q^14) * psi(q^18) * psi(q^126) ) / 2 in powers of q^2 where phi(), psi(), and f() are Ramanujan theta functions.");

print();print(L+O(q^32));
print();for(n=0,100,print(n" "polcoeff(L,2*n)));

print();print("sequence 2");print();
print("Expansion of ( phi(q) * phi(q^63) + phi(-q) * phi(-q^63) + 4 * q^16 * psi(q^2) * psi(q^126) ) / 2 in powers of q^2 where phi(), psi() are Ramanujan theta functions.");

print();print(R+O(q^64));
print();for(n=0,100,print(n" "polcoeff(R,2*n)));

\\ Note that sequence 1 is convolution square of sequence 2

\\ Part IV page 171 incorrect left side q-series
Lside= 2*(L1+L2+L3);   \\ incorrect left side
print();print("sequence 3");print();
print("Expansion of 2 * ( phi(q) * phi(q^7) * phi(q^9) * phi(q^63) + phi(-q) * phi(-q^7) * phi(-q^9) * phi(-q^63) + 4 * q^4 * f(-q^6)^2 * f(-q^42)^2 ) in powers of q^2 where phi(), psi(), and f() are Ramanujan theta functions.");

print();print(Lside+O(q^34));   \\ compare with text
\\ q-series expansion in powers of q^2
print();for(n=0,100,print(n" "polcoeff(Lside,2*n)));

\\ Part IV page 171 correct right side q-series
Rside= (R1+R2+R3)^2;    \\ correct right side
print();print("sequence 4");print();
print("Expansion of ( phi(q) * phi(q^63) + phi(-q) * phi(-q^63) + 4 * q^16 * psi(q^2) * psi(q^126) ) ^ 2 in powers of q^2 where phi(), psi() are Ramanujan theta functions.");

print();print(Rside+O(q^32));  \\ compare with text
\\ q-series expansion in powers of q^2
print();for(n=0,100,print(n" "polcoeff(Rside,2*n)));

            GP/PARI CALCULATOR Version 2.4.3 (development svn-11973M)
           i686 running linux (ix86 kernel) 32-bit version -- debugging
                         compiled: Sep 30 2009, gcc-3.0.4
                  (readline v5.0 enabled, extended help enabled)

                      Copyright (C) 2000-2008 The PARI Group

PARI/GP is free software, covered by the GNU General Public License, and comes
WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.

parisize = 4000000, primelimit = 500509

sequence 1

Expansion of ( phi(q) * phi(q^7) * phi(q^9) * phi(q^63) + phi(-q) * phi(-q^7) * phi(-q^9) * phi(-q^63) + 4 * q^4 * f(-q^6)^2 * f(-q^42)^2 + 16 * q^20 * psi(q^2) * psi(q^14) * psi(q^18) * psi(q^126) ) / 2 in powers of q^2 where phi(), psi(), and f() are Ramanujan theta functions.

1 + 4*q^4 + 4*q^8 + 8*q^16 + 4*q^18 + 16*q^20 + 12*q^22 + 8*q^26 + 4*q^28 + O(q^32)

0 1
1 0
2 4
3 0
4 4
5 0
6 0
7 0
8 8
9 4
10 16
11 12
12 0
13 8
14 4
15 0
16 24
17 16
18 12
19 16
20 24
21 0
22 20
23 12
24 0
25 16
26 32
27 16
28 4
29 20
30 0
31 24
32 36
33 0
34 32
35 0
36 28
37 24
38 32
39 0
40 56
41 40
42 0
43 32
44 60
45 24
46 52
47 40
48 0
49 0
50 76
51 0
52 64
53 28
54 48
55 56
56 8
57 0
58 60
59 32
60 0
61 48
62 56
63 4
64 84
65 48
66 0
67 48
68 88
69 0
70 16
71 36
72 60
73 40
74 80
75 0
76 96
77 12
78 0
79 48
80 144
81 52
82 72
83 56
84 0
85 80
86 80
87 0
88 124
89 56
90 72
91 8
92 108
93 0
94 88
95 96
96 0
97 56
98 4
99 48
100 140

sequence 2

Expansion of ( phi(q) * phi(q^63) + phi(-q) * phi(-q^63) + 4 * q^16 * psi(q^2) * psi(q^126) ) / 2 in powers of q^2 where phi(), psi() are Ramanujan theta functions.

1 + 2*q^4 + 4*q^16 + 2*q^18 + 2*q^22 + 2*q^28 + 4*q^36 + 2*q^46 + 2*q^58 + O(q^64)

0 1
1 0
2 2
3 0
4 0
5 0
6 0
7 0
8 4
9 2
10 0
11 2
12 0
13 0
14 2
15 0
16 0
17 0
18 4
19 0
20 0
21 0
22 0
23 2
24 0
25 0
26 0
27 0
28 0
29 2
30 0
31 0
32 6
33 0
34 0
35 0
36 6
37 0
38 0
39 0
40 0
41 0
42 0
43 0
44 6
45 0
46 0
47 0
48 0
49 0
50 2
51 0
52 0
53 2
54 0
55 0
56 4
57 0
58 0
59 0
60 0
61 0
62 0
63 2
64 0
65 0
66 0
67 0
68 0
69 0
70 0
71 2
72 8
73 0
74 4
75 0
76 0
77 2
78 0
79 0
80 0
81 2
82 0
83 0
84 0
85 0
86 4
87 0
88 0
89 0
90 0
91 0
92 6
93 0
94 0
95 0
96 0
97 0
98 2
99 4
100 0

sequence 3

Expansion of 2 * ( phi(q) * phi(q^7) * phi(q^9) * phi(q^63) + phi(-q) * phi(-q^7) * phi(-q^9) * phi(-q^63) + 4 * q^4 * f(-q^6)^2 * f(-q^42)^2 ) in powers of q^2 where phi(), psi(), and f() are Ramanujan theta functions.

4 + 16*q^4 + 16*q^8 + 32*q^16 + 16*q^18 + 32*q^20 + 16*q^22 + 16*q^28 + 64*q^32 + O(q^34)

0 4
1 0
2 16
3 0
4 16
5 0
6 0
7 0
8 32
9 16
10 32
11 16
12 0
13 0
14 16
15 0
16 64
17 32
18 16
19 32
20 0
21 0
22 48
23 16
24 0
25 0
26 96
27 0
28 16
29 16
30 0
31 32
32 48
33 0
34 64
35 0
36 80
37 32
38 32
39 0
40 128
41 64
42 0
43 64
44 208
45 32
46 112
47 32
48 0
49 0
50 240
51 0
52 160
53 48
54 128
55 96
56 32
57 0
58 144
59 32
60 0
61 96
62 96
63 16
64 208
65 64
66 0
67 64
68 288
69 0
70 32
71 48
72 144
73 32
74 192
75 0
76 224
77 16
78 0
79 64
80 416
81 80
82 160
83 64
84 0
85 128
86 128
87 0
88 336
89 64
90 160
91 0
92 208
93 0
94 224
95 128
96 0
97 32
98 16
99 64
100 368

sequence 4

Expansion of ( phi(q) * phi(q^63) + phi(-q) * phi(-q^63) + 4 * q^16 * psi(q^2) * psi(q^126) ) ^ 2 in powers of q^2 where phi(), psi() are Ramanujan theta functions.

4 + 16*q^4 + 16*q^8 + 32*q^16 + 16*q^18 + 64*q^20 + 48*q^22 + 32*q^26 + 16*q^28 + O(q^32)

0 4
1 0
2 16
3 0
4 16
5 0
6 0
7 0
8 32
9 16
10 64
11 48
12 0
13 32
14 16
15 0
16 96
17 64
18 48
19 64
20 96
21 0
22 80
23 48
24 0
25 64
26 128
27 64
28 16
29 80
30 0
31 96
32 144
33 0
34 128
35 0
36 112
37 96
38 128
39 0
40 224
41 160
42 0
43 128
44 240
45 96
46 208
47 160
48 0
49 0
50 304
51 0
52 256
53 112
54 192
55 224
56 32
57 0
58 240
59 128
60 0
61 192
62 224
63 16
64 336
65 192
66 0
67 192
68 352
69 0
70 64
71 144
72 240
73 160
74 320
75 0
76 384
77 48
78 0
79 192
80 576
81 208
82 288
83 224
84 0
85 320
86 320
87 0
88 496
89 224
90 288
91 32
92 432
93 0
94 352
95 384
96 0
97 224
98 16
99 192
100 560