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.

A062671 Every divisor (except 1) contains the digit 5.

Original entry on oeis.org

5, 25, 53, 59, 125, 151, 157, 251, 257, 265, 295, 353, 359, 457, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 625, 653, 659, 751, 755, 757, 785, 853, 857, 859, 953, 1051, 1151, 1153, 1255, 1259, 1285, 1325, 1451, 1453, 1459, 1475, 1511
Offset: 1

Views

Author

Erich Friedman, Jul 04 2001

Keywords

Examples

			25 has divisors 1, 5 and 25, all of which (except 1) contain the digit 5.
		

Crossrefs

Programs

  • Magma
    [k:k in [2..1500]| forall{d:d in Set(Divisors(k)) diff {1}| 5 in Intseq(d)}]; // Marius A. Burtea, Nov 07 2019
    
  • Mathematica
    fQ[n_, dgt_] := Union[ MemberQ[#, dgt] & /@ IntegerDigits@ Rest@ Divisors@ n][[1]]; Select[ Range[2, 1500], fQ[#, 5] &] (* Robert G. Wilson v, Jun 11 2014 *)
  • Python
    from sympy import divisors
    def ok(n): return all('5' in str(d) for d in divisors(n)[1:])
    print(list(filter(ok, range(2, 1512)))) # Michael S. Branicky, May 25 2021

Extensions

Offset corrected by Amiram Eldar, Nov 07 2019