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-1 of 1 results.

A067044 Smallest positive k such that k*n contains only even digits.

Original entry on oeis.org

2, 1, 2, 1, 4, 1, 4, 1, 32, 2, 2, 2, 2, 2, 4, 3, 4, 16, 12, 1, 2, 1, 2, 1, 8, 1, 18, 1, 14, 2, 2, 2, 2, 2, 8, 8, 6, 6, 12, 1, 2, 1, 2, 1, 64, 1, 6, 1, 14, 4, 4, 4, 8, 9, 4, 4, 4, 7, 14, 1, 4, 1, 14, 1, 4, 1, 4, 1, 12, 4, 4, 4, 28, 3, 8, 3, 6, 6, 34, 1, 6, 1, 8, 1, 8, 1, 24, 1, 32, 32, 22, 5, 22, 3
Offset: 1

Views

Author

Amarnath Murthy, Dec 29 2001

Keywords

Comments

No multiple of 10 can appear in this sequence. - M. F. Hasler, Mar 07 2025

Examples

			a(7) = 4 as among the multiples of 7 (i.e., 7, 14, 21, 28...), 28 is the smallest multiple with only even digits and a(7)= 28/7 = 4.
a(16) = 3 is the first odd term > 1, a(n = 54, 58, 74, 76, 92, 94, 96, 98, ...) are the next examples, cf. A380874. - _M. F. Hasler_, Mar 03 2025
		

Crossrefs

Cf. A014263 (numbers with only even digits), A007091 (numbers in base 5).

Programs

  • Mathematica
    Table[k = n; While[Length[Intersection[{1, 3, 5, 7, 9}, IntegerDigits[k]]] > 0, k = k + n]; k/n, {n, 100}] (* T. D. Noe, Jun 03 2013 *)
    sk[n_]:=Module[{k=1},While[!AllTrue[IntegerDigits[k*n],EvenQ],k++];k]; Array[sk,100] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Mar 27 2015 *)
  • PARI
    apply( {A067044(n, f=1+n%2)=forstep(a=f*n, oo, f*n, digits(a)%2||return(a/n))}, [1..99]) \\ M. F. Hasler, Mar 03 2025
    
  • Python
    A067044 = lambda n: next(k for k in range(1+n%2, 9<<99, 1+n%2)if not any(int(d)&1 for d in str(n*k))) # M. F. Hasler, Mar 03 2025

Formula

From M. F. Hasler, Mar 07 2025: (Start)
There is an explicit formula for many values of n:
a(n) = 1 if n has only even digits <=> n is in A014263, else:
a(n) = 2 if n has only digits < 5 <=> n is in A007091;
a(m*(10^k-1)) = 8*round(10^k/6)^2/m for m = 1, 2, 4 or 8 and any k > 0;
a(5*(10^k-1)) = 16*round(10^k/6)^2 for any k > 0;
a(50*m + {5 or 15}) = 4 if m has all digits < 5. (End)

Extensions

More terms from Eli McGowan (ejmcgowa(AT)mail.lakeheadu.ca), May 06 2002
Data corrected by Paul Tek, Jun 03 2013
Showing 1-1 of 1 results.