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.

A062664 Composite and every divisor (except for 1) contains the digit 2.

Original entry on oeis.org

254, 422, 482, 502, 526, 529, 542, 562, 842, 1042, 1642, 2042, 2246, 2258, 2402, 2426, 2434, 2446, 2458, 2462, 2474, 2498, 2518, 2554, 2558, 2566, 2578, 2582, 2594, 2642, 2654, 2846, 2854, 2858, 2921, 3242, 3254, 3442, 4022, 4126, 4162, 4222, 4226
Offset: 1

Views

Author

Erich Friedman, Jul 04 2001

Keywords

Comments

If k is in the sequence, then all composite divisors of k are in the sequence. - Robert Israel, Jul 11 2019

Examples

			254 has divisors 1, 2, 127 and 254, all of which except for 1 contain the digit 2.
		

Crossrefs

Programs

  • Magma
    [m:m in [2..4300] | not IsPrime(m) and #[d:d in Divisors(m)|2 in Intseq(d)] eq #Divisors(m)-1]; // Marius A. Burtea, Jul 11 2019
  • Maple
    filter:= proc(n) local D;
      if isprime(n) then return false fi;
      andmap(con2,numtheory:-divisors(n) minus {1})
    end proc:
    con2:= proc(n) option remember; member(2,convert(n,base,10)) end proc:
    select(filter, [$4..10000]);# Robert Israel, Jul 11 2019
  • Mathematica
    fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 4230], !PrimeQ[#] && fQ[#, 2] &] (* Robert G. Wilson v, Jun 11 2014 *)

Extensions

Offset changed by Robert Israel, Jul 11 2019