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.

This page as a plain text file.
%I A001101 #65 May 14 2025 01:12:34
%S A001101 18,21,27,42,45,63,84,111,114,117,133,152,153,156,171,190,195,198,201,
%T A001101 207,209,222,228,247,261,266,285,333,370,372,399,402,407,423,444,465,
%U A001101 481,511,516,518,531,555,558,592,603
%N A001101 Moran numbers: k such that k/(sum of digits of k) is prime.
%C A001101 Witno conjectures that a(n) ~ c*n log(n)^2 for some c. - _Charles R Greathouse IV_, Jul 26 2011
%D A001101 Bill Moran, Problem 2074: The Moran Numbers, J. Rec. Math., Vol. 25 No. 3, pp. 215, 1993.
%H A001101 Aaron Toponce, <a href="/A001101/b001101.txt">Table of n, a(n) for n = 1..10000</a> (first 1000 terms from T. D. Noe)
%H A001101 Amin Witno, <a href="http://www.ijopcm.org/Vol/10/IJOPCM(vol.3.2.3.J.10).pdf">Numbers which factor as their digital sum times a prime</a>, International Journal of Open Problems in Computer Science and Mathematics 3:2 (2010), pp. 132-136.
%p A001101 filter:= proc(n) local q;
%p A001101   q:= n/convert(convert(n,base,10),`+`);
%p A001101   q::integer and isprime(q)
%p A001101 end proc:
%p A001101 select(filter, [$1..1000]); # _Robert Israel_, May 13 2025
%t A001101 Select[Range[700], PrimeQ[ # / Total[IntegerDigits[#]]]&] (* _Jean-François Alcover_, Nov 30 2011 *)
%o A001101 (Haskell)
%o A001101 import Data.List (findIndices)
%o A001101 a001101 n = a001101_list !! (n-1)
%o A001101 a001101_list = map succ $ findIndices p [1..] where
%o A001101    p n = m == 0 && a010051 n' == 1 where
%o A001101       (n', m) = divMod n (a007953 n)
%o A001101 -- _Reinhard Zumkeller_, Jun 16 2011
%o A001101 (PARI) is(n)=(k->denominator(k)==1&&isprime(k))(n/sumdigits(n)) \\ _Charles R Greathouse IV_, Jan 10 2014
%o A001101 (Python)
%o A001101 from sympy import isprime
%o A001101 def ok(n): s = sum(map(int, str(n))); return s and n%s==0 and isprime(n//s)
%o A001101 print([k for k in range(604) if ok(k)]) # _Michael S. Branicky_, Mar 28 2022
%Y A001101 Subsequence of A005349, Niven (or Harshad) numbers.
%Y A001101 Cf. A007953, A010051, A085775, A108780, A130338, A062339.
%K A001101 nonn,base,nice
%O A001101 1,1
%A A001101 Bill Moran (moran1(AT)llnl.gov)
%E A001101 Name corrected by _Charles R Greathouse IV_, Jan 10 2014