What is the next number in this sequence?

1, 4, 9, 16, 25, pi

*The sequence is not arbitrary. Create a mathematical function that generates this sequence.*

(In reply to

The 5th degree vs. The interrupted sequence by Brian Smith)

It is readily observed that all the other terms except the 6pth term for p=1,2,.... is a perfect square.

Thus, the 6pth term is a real number which is not a perfect square.

Accordingly, if S(x) denotes the xth term of the given sequence, then:

S(x) = x^2, whenever x!= 0 Mod 6, and:

S(x) = r_i, whenever x = 0 Mod 6, and:

r_i is a real number which is not a perfect square whenever i = 6, 12, 18, .....

Therefore, S(7) = 7^2 = 49, and the given sequence could continue as:

1,4,9,16,25,r_1,49,64,81,100,121,r_2,169,196,225,256,289,r_3,

.... with:

r_1 = pi, and r_j for all j> 1 is a real number which is not a perfect square.

__Note__: The above exercise is merely an elaboration upon part II of the excellent methodology submitted by Brian Smith.