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.

A096683 Least k such that decimal representation of k*n contains only digits 0 and 4.

This page as a plain text file.
%I A096683 #18 Sep 26 2016 09:11:38
%S A096683 4,2,148,1,8,74,572,5,49382716,4,4,37,308,286,296,25,2612,24691358,
%T A096683 2316,2,1924,2,19148,185,16,154,163127572,143,151876,148,14324,125,
%U A096683 13468,1306,1144,12345679,12,1158,1036,1,1084,962,102428,1,98765432
%N A096683 Least k such that decimal representation of k*n contains only digits 0 and 4.
%H A096683 Robert G. Wilson v, <a href="/A096683/b096683.txt">Table of n, a(n) for n = 1..10000</a>
%F A096683 a(n) = A078243(n)/n.
%t A096683 f[n_] := Block[{id = {0, 4}, k = 1}, While[ Union[ Join[id, IntegerDigits[k*n]]] != id, k++]; k]; Array[f, 100] (* or *)
%t A096683 id = {0, 7}; lst = Union[ FromDigits /@ Flatten[ Table[ Tuples[id, j], {j, 15}], 1]]; If[ lst[[1]] == 0, lst = Rest@ lst]; f[n_] := (Min[ Select[lst, Mod[#, n] == 0 &]]/n) /. Infinity -> 0; Array[f, 100] (* or *)
%t A096683 id = {0, 7}; lst = Union[ FromDigits /@ Flatten[ Table[ Tuples[id, j], {j, 15}], 1]]; If[ lst[[1]] == 0, lst = Rest@ lst]; f[n_] := (SelectFirst[lst, Mod[#, n] == 0 &, 0]/n); a = Array[f, 100] (* requires Mathematica v10 *) (* _Robert G. Wilson v_, Sep 26 2016 *)
%Y A096683 Cf. A004290, A078241-A078248, A079339, A096681, A096682, A096684, A096685, A096686, A096687, A096688.
%K A096683 base,nonn
%O A096683 1,1
%A A096683 _Ray Chandler_, Jul 12 2004