A109072 Number of decimal digits ( counted with multiplicity ) in n but not in n^2.
0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 2, 1, 2, 0, 1, 0, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 0, 1, 1, 2, 2, 0, 1, 2, 2, 2, 0, 1, 2, 0, 0, 1, 0, 2, 1, 1, 1, 1, 2, 1, 0, 1, 0, 2, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 0, 0, 1, 1, 0, 0, 0, 1, 1, 1
Offset: 0
Links
- Robert Israel, Table of n, a(n) for n = 0..10000
Crossrefs
Programs
-
Maple
f:= proc(n) local L2; L2:= convert(n^2,base,10); nops(remove(t -> member(t,L2), convert(n,base,10))); end proc: map(f, [$0..200]); # Robert Israel, Feb 22 2017
-
Mathematica
UnsortedComplement[x_List, y__List]:=Replace[x, Dispatch[(#\[RuleDelayed]Sequence[])&/@Union[y]], 1]; Table[Length[UnsortedComplement[IntegerDigits[n], IntegerDigits[n^2]]], {n, 0, 200}]