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.

A194282 Variant of the even lucky numbers (A045954).

Original entry on oeis.org

2, 6, 10, 14, 18, 26, 30, 34, 38, 50, 54, 58, 62, 74, 78, 82, 86, 102, 106, 110, 114, 122, 126, 130, 134, 154, 158, 162, 170, 178, 182, 194, 202, 210, 222, 226, 230, 246, 250, 254, 258, 266, 270, 274, 278, 290, 298, 314, 318, 326, 338, 342, 346, 354, 370
Offset: 1

Views

Author

Alonso del Arte, Aug 22 2011

Keywords

Comments

Write down even numbers: 2, 4, 6, 8, ...; first term is 2 so starting from 2 remove every second number: 2, 6, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, ...; next number is 6 so remove every 6th term starting from 2: 2, 6, 10, 14, 18, 26, 30, 34, 38, 42, 50, ...; etc.
This differs from the even lucky numbers in that for those the first step of removals consists of removing every fourth number rather than every second number as is done here. Michon calls this starting "the sieving directly with p = 2."

Programs

  • Mathematica
    lst = Range[2, 320, 2]; i = 1; While[i <= (len = Length@lst) && (k = lst[[i]]) <= len, lst = Drop[lst, {k, len, k}]; i++]; lst (* Alonso del Arte, based on Robert G. Wilson v's program for A045954, Aug 22 2011 *)