cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A357474 Squarely correct numbers.

Original entry on oeis.org

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

Views

Author

Freddy Barrera, Sep 29 2022

Keywords

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.)

Examples

			14401 is not a term, but 14411 is.
		

Crossrefs

Programs

  • 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
  • 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
    

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