login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A357474
Squarely correct numbers.
0
1, 4, 9, 11, 14, 16, 19, 25, 36, 41, 44, 49, 64, 81, 91, 94, 99, 100, 111, 114, 116, 119, 121, 125, 136, 141, 144, 149, 161, 164, 169, 181, 191, 194, 196, 199, 225, 251, 254, 256, 259, 289, 324, 361, 364, 369, 400, 411, 414, 416, 419, 425, 436, 441, 444, 449, 464
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