 <h1>Python (86 chars)</h1> <pre><code>r=input() l=len(str(r)) while 1: x=str(r*r) y=(len(x)-l)/2 r=int(x[y:y+l]) print r </code></pre> <p>Produces infinite sequence on stdout. Note that backtick trick won't work at least on older versions with <code>long</code> type because of the ending <code>L</code> in representation. Python 3 <code>print</code> as function would add 1 more char for closing paren.</p>