OFFSET
1,2
COMMENTS
A positive integer is a squarely correct number if its base-10 representation consists entirely of one or more adjacent blocks of digits that are positive perfect squares with no leading zeros. (See George Berzsenyi link below.)
LINKS
George Berzsenyi, Consecutively and Squarely Correct (P439), Math Horizons, Vol. 30, Issue 1, The Playground, August 2022.
FORMULA
5n/3 < a(n) << n^k for n > 1, where k = log 10/log 3 = 2.0959.... - Charles R Greathouse IV, Oct 03 2022
EXAMPLE
14401 is not a term, but 14411 is.
PROG
(Python)
from sympy.ntheory.primetest import is_square
def ok(n):
if is_square(n): return True
s = str(n)
return any(s[i]!="0" and ok(int(s[:i])) and ok(int(s[i:])) for i in range(1, len(s)))
print([k for k in range(1, 465) if ok(k)]) # Michael S. Branicky, Oct 03 2022
(PARI) is(n)=if(n<11, issquare(n), n%10, my(d=digits(n)); for(i=1, #d, if(issquare(n%10^i) && d[#d+1-i] && is(n\10^i), return(1))); 0, my(k=valuation(n, 10)); k%2==0 && is(n/10^k)) \\ Charles R Greathouse IV, Oct 04 2022
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Freddy Barrera, Sep 29 2022
STATUS
approved