Configured "allow-as in" on R1 should do the same trick.
Rack1R1#sh ip bgp
Network Next Hop Metric LocPrf Weight Path
* 40.1.0.0/21 40.1.15.5 4294967295 0 100 11 ?
*> 40.1.13.3 4294967295 0 100 11 ?
*> 40.1.1.0/24 0.0.0.0 0 32768 i
* 40.1.8.0/24 40.1.15.5 0 100 200 i
Rack1R1#ping 40.1.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 40.1.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/58/61 ms
Rack1R1#ping 40.1.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 40.1.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 56/58/64 ms
Rack1R1#ping 40.1.7.7
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 40.1.7.7, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/60 ms