A112322 Exclusionary square associated to corresponding smallest n-digit number (A112321), or 0 if no such number exists.
4, 289, 24649, 2393209, 227828836, 41566646641, 0, 0, 0
Offset: 1
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.
409^2 = 167281 and the square 167281 is made up of digits not appearing in 409, hence 409 is a term.
Select[Range[1000], Intersection[IntegerDigits[ # ], IntegerDigits[ #^2]] == {} && Length[Union[IntegerDigits[ # ]]] == Length[IntegerDigits[ # ]] &] (* Tanya Khovanova, Dec 25 2006 *)
f[n_] := Block[{k = Ceiling[10^n*(1/9 + .03032)]}, While[ Intersection[ IntegerDigits[k], IntegerDigits[k^2]] != {}, k++ ]; k]; Table[ f[n], {n, 18}] (* Robert G. Wilson v *)
from math import isqrt def a(n): m = isqrt(int('2'+'0'*(2*n-2))) while set(str(m*m)) & set(str(m)) != set(): m += 1 return m print([a(n) for n in range(1, 12)]) # Michael S. Branicky, Feb 17 2021
Comments