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.

A169967 Numbers whose decimal expansion contains only 0's and 4's.

Original entry on oeis.org

0, 4, 40, 44, 400, 404, 440, 444, 4000, 4004, 4040, 4044, 4400, 4404, 4440, 4444, 40000, 40004, 40040, 40044, 40400, 40404, 40440, 40444, 44000, 44004, 44040, 44044, 44400, 44404, 44440, 44444, 400000, 400004, 400040, 400044, 400400, 400404, 400440, 400444
Offset: 1

Views

Author

N. J. A. Sloane, Aug 07 2010

Keywords

Crossrefs

Programs

  • Haskell
    a169967 n = a169967_list !! (n-1)
    a169967_list = map (* 4) a007088_list
    -- Reinhard Zumkeller, Jan 10 2012
  • Mathematica
    FromDigits/@Tuples[{0,4},6] (* Harvey P. Dale, Dec 21 2018 *)
  • PARI
    print1(0);for(d=1,5,for(n=2^(d-1),2^d-1,print1(", ");forstep(i=d-1,0,-1,print1((n>>i)%2*4)))) \\ Charles R Greathouse IV, Nov 16 2011
    

Formula

a(n+1) = Sum_{k>=0} A030308(n,k)*A093141(k+1). - Philippe Deléham, Oct 16 2011
a(n) = 4 * A007088(n-1).

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

Original entry on oeis.org

4, 2, 148, 1, 8, 74, 572, 5, 49382716, 4, 4, 37, 308, 286, 296, 25, 2612, 24691358, 2316, 2, 1924, 2, 19148, 185, 16, 154, 163127572, 143, 151876, 148, 14324, 125, 13468, 1306, 1144, 12345679, 12, 1158, 1036, 1, 1084, 962, 102428, 1, 98765432
Offset: 1

Views

Author

Ray Chandler, Jul 12 2004

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{id = {0, 4}, k = 1}, While[ Union[ Join[id, IntegerDigits[k*n]]] != id, k++]; k]; Array[f, 100] (* or *)
    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 *)
    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 *)

Formula

a(n) = A078243(n)/n.
Showing 1-2 of 2 results.