OFFSET
1,2
LINKS
Mohammed Yaseen, Table of n, a(n) for n = 1..10000
FORMULA
From Mohammed Yaseen, Apr 18 2023: (Start)
The smallest n-digit term ~ sqrt(2) * 10^(n-1).
The largest n-digit term = 10^n - 2 (see A099150). (End)
EXAMPLE
98 is in this sequence because 98^2 = 9604.
99 is not in this sequence because 99^2 = 9801.
MAPLE
filter:= n -> not member(1, convert(n^2, base, 10)):
select(filter, [$0..200]); # Robert Israel, Apr 27 2023
MATHEMATICA
Select[Range[0, 200], DigitCount[#^2, 10, 1]==0 &]
PROG
(Magma) [n: n in [0..200] | not 1 in Intseq(n^2)];
(Python)
def ok(k): return "1" not in str(k**2)
print([k for k in range(160) if ok(k)]) # Michael S. Branicky, Apr 27 2023
(PARI) isok(k) = !vecsearch(Set(digits(k^2)), 1); \\ Michel Marcus, Apr 29 2023
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Vincenzo Librandi, Feb 22 2015
STATUS
approved