Quite a while ago, the webcomic xkcd posted a gag involving a pokemon battle with an infinite number of pikachus. (here) The title is an obvious reference to the mathematical method of induction, wherein if something works at a low mumber, and it is shown that something working at a given number allows it to work at the next number, it works everywhere.
But that doesn't apply here. One pikachu can be beaten with the right set, so it is possible that an infinite number can also be beaten with something specifically designed to do so. Finding this set is what this post concerns itself with.
The source material is vague as to what the moveset being repeated is, so I'm going to assume it's the same as Red's pikachu in B2W2: volt tackle/iron tail/fake out/brick break, holding a light ball. I chose this because it's the most threatening of Red's sets for our purposes: it contains a priority move, a strong coverage move, and is a full physical set with Iron Tail (which has no immunities and applies a defense drop). I assume Adamant, 252 atk/speed, and a 0IV in HP, for similar reasons. Since RNG will do its absolute worst due to the massive number of turns involved, I've split the battle into two phases for modeling. In the first phase, I assume the RNG is pretty standard, with anything that has a 60% chance or greater happening. During the second phase, random events are whatever is least favourable to me. Crits and added effects will occur every turn they are possible, and I will be completely unable to move from paralysis unless (for PP reasons) I want to be stunlocked. This makes Iron Tail especially threatening, since it's one more thing to handle to avoid taking constant -6 crits.
The defensive solution
I don't think it's possible to use Leppa Berry to keep PP up while still staying alive. Harvest would take up our valuable Ability slot and require a lot of managing due to needing sun, and the only Recycle user that can deal with Iron Tail's defense drop (Klinklang, due to clear body) has no answer to paralysis. But, since the opponent has no access to hazards or hazard removal, a pair of sufficiently sturdy Regenerator mons could simply switch back and forth clearing stat drops while toxic spikes defeats the unending tide of yellow mice. Tangrowth needs to hold leftovers and have a full physically defensive spread to fully heal off a crit iron tail, but can manage it. You do need hazards if you follow the comic's alt text (every 30th or 40th one has two, allowing for switches), but otherwise you could theoretically wait for pikachu to struggle.
Team 1: hazard setter(s)/Tangrowth/Tangrowth
The offensive solution
Instead of avoiding struggle, we could also attempt to out-heal it's recoil and KO pikachu that way. We will need to be immune to both fake out's flinches and static's paralysis to do this effectively. Struggle does 1/4 of our max HP. Baton passing both Ingrain and Aqua Ring gets us halfway there. Just using leftovers still leaves us short. There are two solutions I found for this.
Firstly is using Shell Bell. Since it recovers 1/8 of the damage dealt and we need to heal 1/8 of our own hp, we need something with equal or less hp than pikachu. The easiest way to do this would be by underlevelling a rotom (naturally immune to both paralysis and Fake Out) to lower it's HP, I found 82 is the lowest against a level 100 pikachu to always KO with +6 struggle, which heals a full 0.7% above the threshold we need. If you need to have the same level as your opponent, you would most likely want to use Gastly, with a base 30 hp to pikachu's 35. this starts off as leaving you open to paralyisis, so before baton passing ingrain and aqua ring, make sure gastly has an odd number of Skill Swap PP and the opponent has Limber. The first part may require debuffing the opponent to survive the incoming attacks, the latter bit is most easily accomplished with a Lopunny that knows Entrainment.
Team 2: BP user 1/smeargle/rotom
Team 3: debuffer/lopunny/BP user 1/smeargle/gastly
Finally, there's Poison Heal. This means we can have whatever stats we want and don't need to worry about paralysis, but it's more complicated to get the ability to where we want it (a ghost type). Nothing has both Poison Heal and skill swap/entrainment, so we first need to give pikachu Wandering Spirit so that it will take poison heal at a later point. It's probably easier to precisely tune the HP values to avoid losing HP to rounding than it is to add the extra steps of trading magic bounce and applying toxic spikes to yourself in order to also hold leftovers.
Team 4: Runerigus/Poison Heal/BP user 1/smeargle/ghost type
Let me know what other options and difficulties I may have missed.
But that doesn't apply here. One pikachu can be beaten with the right set, so it is possible that an infinite number can also be beaten with something specifically designed to do so. Finding this set is what this post concerns itself with.
The source material is vague as to what the moveset being repeated is, so I'm going to assume it's the same as Red's pikachu in B2W2: volt tackle/iron tail/fake out/brick break, holding a light ball. I chose this because it's the most threatening of Red's sets for our purposes: it contains a priority move, a strong coverage move, and is a full physical set with Iron Tail (which has no immunities and applies a defense drop). I assume Adamant, 252 atk/speed, and a 0IV in HP, for similar reasons. Since RNG will do its absolute worst due to the massive number of turns involved, I've split the battle into two phases for modeling. In the first phase, I assume the RNG is pretty standard, with anything that has a 60% chance or greater happening. During the second phase, random events are whatever is least favourable to me. Crits and added effects will occur every turn they are possible, and I will be completely unable to move from paralysis unless (for PP reasons) I want to be stunlocked. This makes Iron Tail especially threatening, since it's one more thing to handle to avoid taking constant -6 crits.
The defensive solution
I don't think it's possible to use Leppa Berry to keep PP up while still staying alive. Harvest would take up our valuable Ability slot and require a lot of managing due to needing sun, and the only Recycle user that can deal with Iron Tail's defense drop (Klinklang, due to clear body) has no answer to paralysis. But, since the opponent has no access to hazards or hazard removal, a pair of sufficiently sturdy Regenerator mons could simply switch back and forth clearing stat drops while toxic spikes defeats the unending tide of yellow mice. Tangrowth needs to hold leftovers and have a full physically defensive spread to fully heal off a crit iron tail, but can manage it. You do need hazards if you follow the comic's alt text (every 30th or 40th one has two, allowing for switches), but otherwise you could theoretically wait for pikachu to struggle.
Team 1: hazard setter(s)/Tangrowth/Tangrowth
The offensive solution
Instead of avoiding struggle, we could also attempt to out-heal it's recoil and KO pikachu that way. We will need to be immune to both fake out's flinches and static's paralysis to do this effectively. Struggle does 1/4 of our max HP. Baton passing both Ingrain and Aqua Ring gets us halfway there. Just using leftovers still leaves us short. There are two solutions I found for this.
Firstly is using Shell Bell. Since it recovers 1/8 of the damage dealt and we need to heal 1/8 of our own hp, we need something with equal or less hp than pikachu. The easiest way to do this would be by underlevelling a rotom (naturally immune to both paralysis and Fake Out) to lower it's HP, I found 82 is the lowest against a level 100 pikachu to always KO with +6 struggle, which heals a full 0.7% above the threshold we need. If you need to have the same level as your opponent, you would most likely want to use Gastly, with a base 30 hp to pikachu's 35. this starts off as leaving you open to paralyisis, so before baton passing ingrain and aqua ring, make sure gastly has an odd number of Skill Swap PP and the opponent has Limber. The first part may require debuffing the opponent to survive the incoming attacks, the latter bit is most easily accomplished with a Lopunny that knows Entrainment.
Team 2: BP user 1/smeargle/rotom
Team 3: debuffer/lopunny/BP user 1/smeargle/gastly
Finally, there's Poison Heal. This means we can have whatever stats we want and don't need to worry about paralysis, but it's more complicated to get the ability to where we want it (a ghost type). Nothing has both Poison Heal and skill swap/entrainment, so we first need to give pikachu Wandering Spirit so that it will take poison heal at a later point. It's probably easier to precisely tune the HP values to avoid losing HP to rounding than it is to add the extra steps of trading magic bounce and applying toxic spikes to yourself in order to also hold leftovers.
Team 4: Runerigus/Poison Heal/BP user 1/smeargle/ghost type
Let me know what other options and difficulties I may have missed.