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.

A284920 Numbers with digits 2 and 4 only.

Original entry on oeis.org

2, 4, 22, 24, 42, 44, 222, 224, 242, 244, 422, 424, 442, 444, 2222, 2224, 2242, 2244, 2422, 2424, 2442, 2444, 4222, 4224, 4242, 4244, 4422, 4424, 4442, 4444, 22222, 22224, 22242, 22244, 22422, 22424, 22442, 22444, 24222, 24224, 24242, 24244, 24422, 24424
Offset: 1

Views

Author

Jaroslav Krizek, Apr 05 2017

Keywords

Comments

All terms are even.

Crossrefs

Cf. Numbers with digits 2 and k only for k = 0 - 1 and 3 - 9: A169965 (k = 0), A007931 (k = 1), A032810 (k = 3), this sequence (k = 4), A072961 (k = 5), A284632 (k = 6), A284921 (k = 7), A284922 (k = 8), A284923 (k = 9).

Programs

  • Magma
    [n: n in [1..100000] | Set(IntegerToSequence(n, 10)) subset {2, 4}]
  • Mathematica
    Flatten@ Array[FromDigits /@ Tuples[{2, 4}, #] &, 5] (* Michael De Vlieger, Apr 06 2017 *)

Formula

a(n) = 2 * A007931(n).