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.

Showing 1-2 of 2 results.

A298849 Numbers n where d*n contains the digit d for all of d = 1,2,3,4,5,6,7,8,9.

Original entry on oeis.org

1, 10, 11, 21, 31, 41, 51, 61, 71, 81, 91, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 121, 131, 141, 151, 161, 171, 181, 191, 201, 210, 211, 221, 231, 241, 251, 261, 271, 281, 291, 301, 310, 311, 321, 331, 341, 351, 361, 371, 381, 391, 401, 410, 411, 421
Offset: 1

Views

Author

J. Lowell, Jan 27 2018

Keywords

Comments

Includes all numbers whose rightmost nonzero digit is a 1.

Examples

			12 times 5 = 60, which doesn't contain the digit 5; so 12 is not in this sequence.
		

Crossrefs

Cf. A296606.

Programs

  • Maple
    filter:= n -> andmap(d -> has(convert(d*n,base,10),d), [$1..9]):
    select(filter, [$1..1000]); # Robert Israel, Feb 27 2018
  • Mathematica
    Select[Range[421], Function[n, NoneTrue[Range@ 9, FreeQ[IntegerDigits[n #], #] &]]] (* Michael De Vlieger, Jan 28 2018 *)
  • PARI
    isok(n) = {for (d=1, 9, if (! vecsearch(Set(digits(d*n)), d), return (0));); return(1);} \\ Michel Marcus, Jan 27 2018

Extensions

More terms from Michel Marcus, Jan 27 2018

A337084 a(n) is the smallest nonzero digit d whose product d*n will contain the digit d, or 0 if no such digit exists.

Original entry on oeis.org

1, 0, 5, 0, 5, 2, 5, 0, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 9, 5, 0, 5, 2, 5, 6, 5, 5, 1, 0, 5, 0, 4, 2, 4, 0, 5, 0, 1, 0, 5, 3, 3, 2, 5, 8, 5, 5, 1, 0, 5, 7, 5, 2, 5, 0, 5, 2, 1, 2, 2, 2, 5, 2, 5, 7, 5, 5, 1, 0, 5, 0, 5, 2, 3, 3, 3, 0, 1, 7
Offset: 1

Views

Author

J. Lowell, Aug 14 2020

Keywords

Comments

a(n) = 1 for all numbers that contain the digit 1.
For all numbers with 6 followed by a digit in the 0-4 interval, a(n) is 1 or 2.
For all numbers with an odd digit followed by a 0, a(n) is in the 1-5 interval.

Examples

			a(22) = 9 because none of 22*1 to 22*8 contain the digit that we multiplied 22 by to get the product, but 22*9 = 198 which contains the digit 9.
		

Crossrefs

Indices of 0's give A296606.
Indices of 1's give A011531.

Programs

  • Mathematica
    a[n_] := Module[{d = 1}, While[d < 10 && ! MemberQ[IntegerDigits[n*d], d], d++]; If[d < 10, d, 0]]; Array[a, 100] (* Amiram Eldar, Aug 15 2020 *)
  • PARI
    a(n) = {for (d=1, 9, if (#select(x->(x==d), digits(n*d)), return (d));); return (0);} \\ Michel Marcus, Sep 13 2020
Showing 1-2 of 2 results.