login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A346135 Numbers k such that k and 4k, taken together, contain all digits 1 though 9 at least once. 0

%I

%S 3942,4392,5796,7956,11738,11963,13196,13692,13698,13724,13742,13942,

%T 14237,14392,14673,14693,15473,15737,15873,15942,15948,16473,17357,

%U 17358,17381,17438,17453,17458,17463,18559,18592,19463,19613,19631,19643,19863,21369,21374,21394,21439

%N Numbers k such that k and 4k, taken together, contain all digits 1 though 9 at least once.

%C The first four members use all the digits 1-9 exactly once. They form the sequence A115929.

%e 3942 and 3942*4=15768 use once all the digits from 1 to 9.

%e 11738 and 11738*4=46952 use all the digits from 1 to 9 with repetitions.

%p q:= n-> (s-> is({seq(parse(s[i]), i=1..length(s))}={$1..9}))(cat("", n, 4*n)):

%p select(q, [$1..22000])[]; # _Alois P. Heinz_, Jul 05 2021

%t Select[Range[1000, 99999], Union[IntegerDigits[#], IntegerDigits[4 #]] == {1, 2, 3, 4, 5, 6, 7, 8, 9} &]

%o (Python)

%o def ok(n): return (set(str(n)) | set(str(4*n))) == set("123456789")

%o print(list(filter(ok, range(21440)))) # _Michael S. Branicky_, Jul 05 2021

%o (PARI) isok(k) = my(s=setunion(Set(digits(k)), Set(digits(4*k)))); vecmin(s) && (#s == 9); \\ _Michel Marcus_, Jul 11 2021

%Y Cf. A115929 (finite subsequence).

%K nonn,base

%O 1,1

%A _Tanya Khovanova_, Jul 05 2021

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified November 28 13:47 EST 2021. Contains 349413 sequences. (Running on oeis4.)