Start with the first number of a group of 3 numbers. The second number of the group is the square of the first number. Add 2 to that to get the next number. Then, subtract 1 to arrive at the first number of the next group.

1 start

1 = 1^2

3 = 1 + 2

2 = 3 - 1 start

4 = 2^2

6 = 4 + 2

5 = 6 - 1 start

25 = 5^2

27 = 25 + 2

26 = 27 - 1 start

676 = 26^2

...

1 start

1 = 1^2

3 = 1 + 2

2 = 3 - 1 start

4 = 2^2

6 = 4 + 2

5 = 6 - 1 start

25 = 5^2

27 = 25 + 2

26 = 27 - 1 start

676 = 26^2

...