|
|
A354256
|
|
Squares that remain square when written backward, are not divisible by 10, and have an even number of digits.
|
|
1
|
|
|
|
OFFSET
|
1,1
|
|
COMMENTS
|
a(10) > 10^21.
Is this sequence infinite?
Every term is a multiple of 121.
Terms come in nonpalindromic pairs and palindromic singles; see Example section.
Removal of the "even number of digits" requirement yields A033294, which has 8560 terms < 10^20.
|
|
LINKS
|
|
|
EXAMPLE
|
There are no 2-digit terms.
The smallest 4-digit multiple of 121 is 1089 = 33^2, which happens to be a(1); its digit reversal is a(2) = 9801 = 99^2.
The only 6-digit term is the palindrome a(3) = 698896 = 836^2.
The only 8-digit terms are a(4) = 10036224 = 3168^2 and its digit reversal a(5) = 42263001 = 6501^2.
There are no 10-digit terms.
The only 12-digit term is the palindrome a(6) = 637832238736 = 798644^2.
There are no 14-digit terms.
There are three 16-digit terms: a(7) = 1021178969603881 = 31955891^2, its digit reversal a(8) = 1883069698711201 = 43394351^2, and the palindrome a(9) = 4099923883299904 = 64030648^2.
|
|
PROG
|
(Python)
from math import isqrt
from itertools import count, islice
def sqr(n): return isqrt(n)**2 == n
def agen(): yield from (k*k for k in count(1) if k%10 and len(s:=str(k*k))%2==0 and sqr(int(s[::-1])))
(Python)
from math import isqrt
from itertools import count, islice
from sympy import integer_nthroot
def A354256_gen(): # generator of terms
for l in count(2, 2):
for m in (1, 4, 5, 6, 9):
for k in range(1+isqrt(m*10**(l-1)-1), 1+isqrt((m+1)*10**(l-1)-1)):
if k % 10 and integer_nthroot(int(str(k*k)[::-1]), 2)[1]:
yield k*k
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base,more
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|