The palindromic number `595` is interesting because it can be written as the sum of consecutive squares: `6^2 + 7^2 + 8^2 + 9^2 + 10^2 + 11^2 + 12^2 = 595`.
There are exactly eleven palindromes below one-thousand that can be written as consecutive square sums. Note that `1 = 0^2 + 1^2` has not been included as this problem is concerned with the squares of positive integers.
Given an input `n`, find the count of all the numbers less than `n` that are both palindromic and can be written as the sum of consecutive squares.
For instance: `values(1000) = 11`. See test examples for more cases.  
Good luck!
This Kata is borrowed from [Project Euler #125](https://projecteuler.net/problem=125)
If you like this Kata, please try:
[Fixed length palindromes](https://www.codewars.com/kata/59f0ee47a5e12962cb0000bf)
[Divisor harmony](https://www.codewars.com/kata/59bf97cd4f98a8b1cd00007e)
def values(n):
    p = set()
    for i in range(1, int(n**0.5)):
        q = i*i
        while q < n:
            i=i+ 1
            q =q+ i*i
            if str(q)==str(q)[::-1] and q < n:
                p.add(q)
    return len(p)
def values(n):
    p = set()
    for i in range(1, int(n**0.5)):
        q = i*i
        while q < n:
            i=i+ 1
            q =q+ i*i
            if str(q)==str(q)[::-1] and q < n:
                p.add(q)
    return len(p)