Seamless animation loop of procedural textures
A procedural texture can be made to appear continuous, repeating and seamless by blending with another section of itselfto hide the 'seam'. 

Final result :



This can be achieved with the following nodes :



Note the nodes marked in Cyan which can be used to animate/adjust the texture to get pleasing results (to make the transition unnoticeable). 

The first (Value) node allows the Z coordinate to be animated. The texture will be repeated every 1.0 unit (in this case it's using Generated texture coordinates and the blending occurs in the Z direction) by way of the Modulo function - use the Scale and an optional Mapping node to affect how big a section is repeated.

The Offset input node can be used to adjust which alternative section of Voronoi to use to blend over the seam - adjust this to choose a suitable section of texture that is as similar as possible to help hide the transition. The Scale of the Voronoi can be adjusted with the Scale input value.

The amount of blending between the textures can be adjusted via the Color Ramp node - moving the Black and White points closer or further apart will vary the sharpness of the blend between the textures.

Note that you can add a Mapping node immediately after the Texture Coordinate node and vary the scale to change the spacing of the repeat. Similarly, this same method would work with other textures such as Noise, Musgrave, Images, etc. - however, very regular textures (such as Brick, Checker, etc.) will likely produce noticable artifacts - this method works best with fairly 'organic' textures. Equally, you could use an Image Texture if desired.

Note also that since this is produced using standard nodes it will still be able to be rendered using GPU (not possible with OSL).

Blending between the textures occurs based on a Cosine function which is carefully scaled (note the Multiply nodes set to 2*pi) to be at a maximum (1.0) at the seam of one texture (at 0.0 and 1.0) and a minimum (0.0) at the seam of the other (which is offset so its seam occurs at 0.5). By mixing between the two textures in this way, the seam is always invisible.

Blend file included