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.

A001101 Moran numbers: k such that k/(sum of digits of k) is prime.

Original entry on oeis.org

18, 21, 27, 42, 45, 63, 84, 111, 114, 117, 133, 152, 153, 156, 171, 190, 195, 198, 201, 207, 209, 222, 228, 247, 261, 266, 285, 333, 370, 372, 399, 402, 407, 423, 444, 465, 481, 511, 516, 518, 531, 555, 558, 592, 603
Offset: 1

Views

Author

Bill Moran (moran1(AT)llnl.gov)

Keywords

Comments

Witno conjectures that a(n) ~ c*n log(n)^2 for some c. - Charles R Greathouse IV, Jul 26 2011

References

  • Bill Moran, Problem 2074: The Moran Numbers, J. Rec. Math., Vol. 25 No. 3, pp. 215, 1993.

Crossrefs

Subsequence of A005349, Niven (or Harshad) numbers.

Programs

  • Haskell
    import Data.List (findIndices)
    a001101 n = a001101_list !! (n-1)
    a001101_list = map succ $ findIndices p [1..] where
       p n = m == 0 && a010051 n' == 1 where
          (n', m) = divMod n (a007953 n)
    -- Reinhard Zumkeller, Jun 16 2011
    
  • Maple
    filter:= proc(n) local q;
      q:= n/convert(convert(n,base,10),`+`);
      q::integer and isprime(q)
    end proc:
    select(filter, [$1..1000]); # Robert Israel, May 13 2025
  • Mathematica
    Select[Range[700], PrimeQ[ # / Total[IntegerDigits[#]]]&] (* Jean-François Alcover, Nov 30 2011 *)
  • PARI
    is(n)=(k->denominator(k)==1&&isprime(k))(n/sumdigits(n)) \\ Charles R Greathouse IV, Jan 10 2014
    
  • Python
    from sympy import isprime
    def ok(n): s = sum(map(int, str(n))); return s and n%s==0 and isprime(n//s)
    print([k for k in range(604) if ok(k)]) # Michael S. Branicky, Mar 28 2022

Extensions

Name corrected by Charles R Greathouse IV, Jan 10 2014