OFFSET
1,1
COMMENTS
It can easily be shown that all squares that remain squares if prefixed with the digit 1 end in 00 or 25 and, moreover, that all squares ending in 00 are multiples of the squares ending in 5 (factor: 10^(2*n)).
Subsequence of A167035. - Michel Marcus, Sep 08 2014
LINKS
Reiner Moewald, Table of n, a(n) for n = 1..102
EXAMPLE
225 = 15*15 and 1225 = 35*35.
MAPLE
A:= {}:
for m from 3 to 100 do
cand1:= floor(log[5](1/2*(1+sqrt(2))*10^(m/2)));
cand2:= floor(log[5](2*(1+sqrt(2))*(5/2)^(m/2)));
s1:= 5^cand1 - 10^m/4/5^cand1;
s2:= 2^m/4*5^cand2 - 5^(m-cand2);
if s1^2 >= 10^(m-1) then A:= A union {s1^2} fi;
if s2^2 >= 10^(m-1) then A:= A union {s2^2} fi;
od:
A; # Robert Israel, Sep 08 2014
PROG
(Python)
import math
def power(a, n):
...pow = 1
...for i in range(0, n):
......pow = pow * a
...return pow
end = 50
for n in range(1, end):
...l1 = 1/math.log(5)*(math.log(math.sqrt(2)-1)+(n-2)/2*math.log(2))+ n/2
...u1 = 1/math.log(5)*(math.log(math.sqrt(11)-1)+(n-3)/2*math.log(2))+ (n-1)/2
...if math.ceil(l1) == math.floor(u1) and math.ceil(l1)>0:
......p = math.ceil(l1)
......x = power(5, p)*(-1)+power(2, n-2)*power(5, n-p)
......print(x*x)
...l2 = 1/math.log(5)*(math.log(math.sqrt(11)+1)+(n-3)/2*math.log(2))+ (n-1)/2
...u2 = 1/math.log(5)*(math.log(math.sqrt(2)+1)+(n-2)/2*math.log(2))+ n/2
...if math.ceil(l2) == math.floor(u2) and math.ceil(l2)>0:
......p = math.ceil(l2)
......x = power(5, p)-power(2, n-2)*power(5, n-p)
......print(x*x)
print('End.')
(PARI)
for(n=1, 10^20, p=n^2; if(p%100, s=concat("1", Str(p)); if(issquare(eval(s)), print1(p, ", ")))) \\ Derek Orr, Aug 23 2014
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Reiner Moewald, Aug 16 2014
STATUS
approved