A080883Distance of n to next square.

1, 3, 2, 1, 5, 4, 3, 2, 1, 7, 6, 5, 4, 3, 2, 1, …

The first 3 terms appear at position 110.

…348253421170679821480865132823066470938446095505822…
position 110
termsstringfirst positionoccurrences
11199,997,334
2131109,998,738
3132110999,211
4132116,563100,042
51321520,0239,862
613215420,023925
7132154320,02388
81321543220,0238
9132154321not within 1,000,000,0000
101321543217not within 1,000,000,0000
1113215432176not within 1,000,000,0000
12132154321765not within 1,000,000,0000

Searched the first 1,000,000,000 digits. Strings longer than 12 digits are not indexed.