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.

A242268 Squares not ending in 00 that remain squares if prefixed with the digit 1.

This page as a plain text file.
%I A242268 #31 Feb 03 2025 18:57:55
%S A242268 225,5625,5405625,23765625,2127515625,58503515625,51921031640625,
%T A242268 250727431640625,20090404775390625,608180644775390625,
%U A242268 498431438615478515625,2642208974615478515625,189450791534674072265625,6319494849134674072265625,9981411957966851806640625
%N A242268 Squares not ending in 00 that remain squares if prefixed with the digit 1.
%C A242268 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)).
%C A242268 Subsequence of A167035. - _Michel Marcus_, Sep 08 2014
%H A242268 Reiner Moewald, <a href="/A242268/b242268.txt">Table of n, a(n) for n = 1..102</a>
%e A242268 225 = 15*15 and 1225 = 35*35.
%p A242268 A:= {}:
%p A242268 for m from 3 to 100 do
%p A242268   cand1:= floor(log[5](1/2*(1+sqrt(2))*10^(m/2)));
%p A242268   cand2:= floor(log[5](2*(1+sqrt(2))*(5/2)^(m/2)));
%p A242268   s1:= 5^cand1 - 10^m/4/5^cand1;
%p A242268   s2:=  2^m/4*5^cand2 - 5^(m-cand2);
%p A242268   if s1^2 >= 10^(m-1) then A:= A union {s1^2} fi;
%p A242268   if s2^2 >= 10^(m-1) then A:= A union {s2^2} fi;
%p A242268 od:
%p A242268 A; # _Robert Israel_, Sep 08 2014
%o A242268 (Python)
%o A242268 import math
%o A242268 def power(a, n):
%o A242268    pow = 1
%o A242268    for i in range(0, n):
%o A242268       pow = pow * a
%o A242268    return pow
%o A242268 end = 50
%o A242268 for n in range(1, end):
%o A242268    l1 = 1/math.log(5)*(math.log(math.sqrt(2)-1)+(n-2)/2*math.log(2))+ n/2
%o A242268    u1 = 1/math.log(5)*(math.log(math.sqrt(11)-1)+(n-3)/2*math.log(2))+ (n-1)/2
%o A242268    if math.ceil(l1) == math.floor(u1) and math.ceil(l1)>0:
%o A242268       p = math.ceil(l1)
%o A242268       x = power(5, p)*(-1)+power(2, n-2)*power(5, n-p)
%o A242268       print(x*x)
%o A242268    l2 = 1/math.log(5)*(math.log(math.sqrt(11)+1)+(n-3)/2*math.log(2))+ (n-1)/2
%o A242268    u2 = 1/math.log(5)*(math.log(math.sqrt(2)+1)+(n-2)/2*math.log(2))+ n/2
%o A242268    if math.ceil(l2) == math.floor(u2) and math.ceil(l2)>0:
%o A242268       p = math.ceil(l2)
%o A242268       x = power(5, p)-power(2, n-2)*power(5, n-p)
%o A242268       print(x*x)
%o A242268 print('End.')
%o A242268 (PARI)
%o A242268 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
%Y A242268 Cf. A167035.
%K A242268 nonn,base
%O A242268 1,1
%A A242268 _Reiner Moewald_, Aug 16 2014