A249896
a(n+1) is next smallest square not divisible by 10 beginning with a(n), initial term is 6.
Original entry on oeis.org
6, 64, 64009, 6400960036, 640096003602877347904, 640096003602877347904912233550482787380625, 6400960036028773479049122335504827873806251020537411455326101704116338781035920283225
Offset: 1
-
R:= 6: x:= 6: s:= 2:
for iter from 1 while length(x) < 1000 do
for d from 1 do
if d::even then sp:= 1+ 10^(d/2)*s
else
sp:= ceil(sqrt(10^d*x));
if sp mod 10 = 0 then sp:=sp+1; fi
fi;
if sp^2 < (x+1)*10^d then
x:= sp^2; s:= sp; R:= R, x; break
fi
od;
od:
R; # Robert Israel, Nov 25 2020
-
a(n)=k=n; s=1; while(s<5*10^7, if(s%10, if(s^2\(10^(#Str(s^2)-#Str(k)))==k, print1(s^2, ", "); k=s^2)); s++)
a(7)
-
def f(x):
print(x, end=', ')
n = x
s = 1
while s < 10**7:
if s % 10:
S = str(s**2)
if S.startswith(str(n)):
print(s**2, end=', ')
n = s**2
s += 1
f(7)
A249897
a(n+1) is next smallest square not divisible by 10 beginning with a(n), initial term is 7.
Original entry on oeis.org
7, 729, 729316, 7293164743396, 72931647433968832639882896, 72931647433968832639882896319584064899663299793041401
Offset: 1
-
a(n)=k=n; s=1; while(s<5*10^7, if(s%10, if(s^2\(10^(#Str(s^2)-#Str(k)))==k, print1(s^2, ", "); k=s^2)); s++)
a(7)
-
def f(x):
print(x, end=', ')
n = x
s = 1
while s < 10**7:
if s % 10:
S = str(s**2)
if S.startswith(str(n)):
print(s**2, end=', ')
n = s**2
s += 1
f(7)
A048560
a(n+1)^2 is next smallest nontrivial square beginning with a(n)^2, initial square is 4.
Original entry on oeis.org
2, 7, 222, 70203, 22200137858, 2220013785800000000001, 7020300000101169666284501016647428364760574, 22200137858000000000010000000000000000000001726952547826525063393038550959517040374473
Offset: 0
A249893
a(n+1) is next smallest square not divisible by 10 beginning with a(n), initial term is 2.
Original entry on oeis.org
2, 25, 256, 256036, 2560361612769, 256036161276932002260000001, 256036161276932002260000001607597862784080913990785121
Offset: 1
-
a(n)=k=n;s=1;while(s<5*10^7,if(s%10,if(s^2\(10^(#Str(s^2)-#Str(k)))==k,print1(s^2,", ");k=s^2));s++)
a(2)
-
def f(x):
print(x,end=', ')
n = x
s = 1
while s < 10**7:
if s % 10:
S = str(s**2)
if S.startswith(str(n)):
print(s**2,end=', ')
n = s**2
s += 1
f(2)
-
from math import isqrt
def anext(an):
lo, hi = an*10, an*10 + 9
while True:
found = False
if isqrt(hi)**2 > lo: return (isqrt(lo)+1)**2
lo, hi = lo*10, hi*10 + 9
n, an = 1, 2
for n in range(2, 17):
an = anext(an)
print(n, an) # Michael S. Branicky, Feb 25 2021
A249898
a(n+1) is next smallest square not divisible by 10 beginning with a(n), initial term is 8.
Original entry on oeis.org
8, 81, 81225, 8122515625, 812251562541751472569, 812251562541751472569881528811450814530084
Offset: 1
-
a(n)=k=n; s=1; while(s<5*10^7, if(s%10, if(s^2\(10^(#Str(s^2)-#Str(k)))==k, print1(s^2, ", "); k=s^2)); s++)
a(8)
-
def f(x):
print(x, end=', ')
n = x
s = 1
while s < 10**7:
if s % 10:
S = str(s**2)
if S.startswith(str(n)):
print(s**2, end=', ')
n = s**2
s += 1
f(8)
A249804
a(n+1) is the next smallest nontrivial cube beginning with a(n), initial term is 4.
Original entry on oeis.org
4, 4096, 409675763483, 4096757634832457594649749511342547903
Offset: 1
-
a(n)=k=n; s=1; while(s<10^7, if(s%10, if(s^3\(10^(#Str(s^3)-#Str(k)))==k, print1(s^3, ", "); k=s^3)); s++)
a(4)
-
def f(x):
n = x
s = 1
while s < 10**7:
if s % 10:
S = str(s**3)
if S.startswith(str(n)):
print(s**3, end=', ')
n = s**3
s += 1
f(4)
A249834
a(n+1) is the next smallest nontrivial cube beginning with a(n), initial term is 7.
Original entry on oeis.org
7, 729, 7290099019, 72900990191475181426079596544
Offset: 1
-
a(n)=k=n; s=1; while(s<10^7, if(s%10, if(s^3\(10^(#Str(s^3)-#Str(k)))==k, print1(s^3, ", "); k=s^3)); s++)
a(7)
-
def f(x):
n = x
s = 1
while s < 10**7:
if s % 10:
S = str(s**3)
if S.startswith(str(n)):
print(s**3, end=', ')
n = s**3
s += 1
f(7)
A249837
a(n+1) is the next smallest nontrivial cube beginning with a(n), initial term is 9.
Original entry on oeis.org
9, 9261, 92615351886784, 9261535188678457128255779014690172977343833, 926153518867845712825577901469017297734383369607525414854584903918819898290730346512973206455943454340951813592133138664220381927
Offset: 1
-
nextterm:= proc(x) local d,s,t;
for d from 1 do
s:= traperror(ceil((x*10^d+1)^(1/3)));
while not type(s,integer) do
Digits:= Digits *2;
s:= traperror(ceil((x*10^d+1)^(1/3)));
od:
t:= traperror(floor(((x+1)*10^d-1)^(1/3)));
while not type(t,integer) do
Digits:= Digits *2;
t:= traperror(floor(((x+1)*10^d-1)^(1/3)));
od:
if s <= t then return s^3 fi;
od:
end proc:
a[1]:= 9;
for n from 2 to 6 do a[n]:= nextterm(a[n-1]) od; # Robert Israel, Dec 04 2014
-
a(n)=k=n; s=1; while(s<10^7, if(s%10, if(s^3\(10^(#Str(s^3)-#Str(k)))==k, print1(s^3, ", "); k=s^3)); s++)
a(9)
-
def f(x):
n = x
s = 1
while s < 10**7:
if s % 10:
S = str(s**3)
if S.startswith(str(n)):
print(s**3, end=', ')
n = s**3
s += 1
f(9)
Comments