Program Sequence Generator Your challenge is to implement a cyclic Program Sequence Generator (PSG) in a language of your choice.

Given a language, L, a PSG in L is a program in L that outputs a PSG in L. Some properties of a PSG are:


Repeated execution of a PSG in L generates a sequence of programs in L.
A PSG is said to be cyclic if the sequence it generates is cyclic.
The period of a cyclic PSG, P, is written T(P) and is the period of the cycle in the sequence it generates. The period of a non-cyclic PSG is written the same way and is infinite.


A trivial example of a PSG is a quine; any quine is a cyclic PSG with period 1.

To make this challenge interesting, the period of your PSG must be at least 5.

Scoring is a bit different than typical code golf. Informally, your score is the sum of the length of all programs in one cycle of the sequence generated by your PSG divided by the period of your PSG. Formally: let P be your PSG, pₙ be the nth term in your PSG's sequence, and l(pₙ) be the length in bytes of pₙ. Then your score is:



For a non-cyclic PSG, since the limit of l(pₙ) as n goes to infinity is infinity, the score of any non-cyclic PSGs diverges to infinity.

The PSG with the lowest score wins
JavaScript (ES6), score 77 74 66
The period of this PSG is 5.  Each iteration of the sequence removes one asterisk in the block comment until it reaches 2, then goes back to 6.
f=_=&gt;/**/`f=${f}`.replace('**/','*/').replace('/*\/','/******/')

Let's look at some partial sums to see what the limit approaches.
m     1     2     3     4     5
score 64    66    66.33 66.25 66

Edit: thanks to @ETHproductions for pointing out that I should put the comment first.  Not only is the code much shorter, it appears neater!