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.

A380997 a(n) is the least number with exactly 2 different decimal digits that is a multiple of n.

This page as a plain text file.
%I A380997 #12 Feb 13 2025 10:00:29
%S A380997 10,10,12,12,10,12,14,16,18,10,110,12,13,14,15,16,17,18,19,20,21,110,
%T A380997 23,24,25,26,27,28,29,30,31,32,330,34,35,36,37,38,39,40,41,42,43,220,
%U A380997 45,46,47,48,49,50,51,52,53,54,110,56,57,58,59,60,61,62,63,64,65,330,67,68,69,70,71,72,73
%N A380997 a(n) is the least number with exactly 2 different decimal digits that is a multiple of n.
%C A380997 a(n) is the least multiple of n that is in A031955.
%H A380997 Robert Israel, <a href="/A380997/b380997.txt">Table of n, a(n) for n = 1..10000</a>
%e A380997 a(22) = 110 because 110 has two different decimal digits 0 and 1, is a multiple of 22, and no smaller multiple of 22 works.
%p A380997 f:= proc(n) local d,i,s,S;
%p A380997        S:= select(t -> nops(convert(convert(t*n mod 100,base,10),set)) <= 2, [$1..99] );
%p A380997        for d from 3 do
%p A380997          S:= select(s -> nops(convert(convert(s*n mod 10^d,base,10),set)) <= 2,
%p A380997                [seq(seq(s+i*10^(d-1),s = S),i=0..9)]);
%p A380997          for s in S do if nops(convert(convert(s*n,base,10),set)) = 2  then return s*n fi od;
%p A380997        od;
%p A380997 end proc:
%p A380997 map(f, [$1..1000]);
%t A380997 a[n_]:=Module[{k=n}, While[Length[DeleteDuplicates[IntegerDigits[k]]]!=2, k+=n]; k]; Array[a,73] (* _Stefano Spezia_, Feb 13 2025 *)
%o A380997 (PARI) a(n) = my(k=n); while(#Set(digits(k)) != 2, k+=n); k; \\ _Michel Marcus_, Feb 13 2025
%Y A380997 Cf. A031955.
%K A380997 nonn,base,look
%O A380997 1,1
%A A380997 _Robert Israel_, Feb 11 2025