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.

Showing 1-6 of 6 results.

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

A235397 The first term of the least sequence of n consecutive Moran numbers.

Original entry on oeis.org

18, 152, 3031, 21481224, 25502420, 4007565001480, 2196125475223740, 905295493763807066010
Offset: 1

Views

Author

Carlos Rivera, Jan 09 2014

Keywords

Comments

A number n is a Moran number if n divided by the sum of its decimal digits is prime.
From Amiram Eldar, Apr 25 2020: (Start)
Jens Kruse Andersen found that a(7) <= 2196125475223740 and a(8) <= 905295493763807066010 (see Rivera link).
Since Moran numbers (A001101) are also Niven numbers (A005349), this sequence is finite with no more than 20 terms (see A060159). (End)
a(9) <= 270140199032572375590810. - Giovanni Resta, Apr 30 2020

Examples

			a(6) = 4007565001480 because
4007565001480 = 40 * 100189125037,
4007565001481 = 41 * 97745487841,
4007565001482 = 42 * 95418214321,
4007565001483 = 43 * 93199186081,
4007565001484 = 44 * 91081022761,
4007565001485 = 45 * 89057000033.
		

Crossrefs

Programs

  • PARI
    isA001101(n)=(k->denominator(k)==1&&isprime(k))(n/sumdigits(n))
    a(n)=my(k=n); while(1, forstep(i=k,k-n+1,-1, if(!isA001101(i), k=i+n; next(2))); return(k-n+1)) \\ Charles R Greathouse IV, Jan 10 2014

Extensions

a(7)-a(8) from Giovanni Resta, Apr 27 2020

A334345 Numbers k such that k and k+1 are both binary Moran numbers (A334344).

Original entry on oeis.org

115, 355, 1266, 1555, 1686, 1795, 4195, 4206, 4962, 5155, 5298, 6978, 9235, 10002, 11230, 13315, 18822, 21752, 22602, 23106, 26072, 29816, 40616, 42258, 60056, 60730, 64690, 68802, 83586, 87272, 91736, 94616, 100990, 107526, 108910, 109448, 113192, 121112, 125436
Offset: 1

Views

Author

Amiram Eldar, Apr 23 2020

Keywords

Examples

			115 is a term since 115/A000120(115) = 23 and 116/A000120(116) = 29 are both prime numbers.
		

Crossrefs

Subsequence of A330931 and A334344.

Programs

  • Maple
    q:= n-> (p-> is(p, integer) and isprime(p))(n/add(i, i=Bits[Split](n))):
    select(k-> q(k) and q(k+1), [$1..126000])[];  # Alois P. Heinz, Apr 23 2020
  • Mathematica
    binMoranQ[n_] := PrimeQ[n / DigitCount[n, 2, 1]]; Select[Range[10^5], binMoranQ[#] && binMoranQ[# + 1] &]

A334371 Starts of runs of 3 consecutive Moran numbers (A001101).

Original entry on oeis.org

3031, 13116, 46824, 201614, 456325, 1310412, 1499434, 1825225, 2217620, 2318423, 2522540, 2784634, 3132380, 3276024, 3931226, 4013113, 4555476, 5017340, 5211380, 6309602, 6338910, 6526835, 7197154, 8678920, 9108023, 9258002, 10256420, 10533620, 10614266, 10810824
Offset: 1

Views

Author

Amiram Eldar, Apr 25 2020

Keywords

Examples

			3031 is a term since 3031/(3+0+3+1) = 433, 3032/(3+0+3+2) = 379 and 3033/(3+0+3+3) = 337 are all primes.
		

Crossrefs

Subsequence of A001101, A085775 and A154701.

Programs

  • Mathematica
    moranQ[n_] := PrimeQ[n / Plus @@ IntegerDigits[n]]; m = moranQ /@ Range[3]; seq = {}; Do[If[And @@ m, AppendTo[seq, k - 3]]; m = Join[Rest[m], {moranQ[k]}], {k, 4, 10^6}]; seq

A334372 Starts of runs of 4 consecutive Moran numbers (A001101).

Original entry on oeis.org

21481224, 22314620, 25502420, 25502421, 32432425, 130062260, 147026913, 713021425, 922216713, 938710112, 1012101135, 1019292153, 1113068913, 1420791155, 1545743565, 1671500190, 1805406154, 1941702882, 2010317425, 2027025025, 2200277555, 2307662313, 2437253313
Offset: 1

Views

Author

Amiram Eldar, Apr 25 2020

Keywords

Examples

			21481224 is a term since 21481224/(2+1+4+8+1+2+2+4) = 895051, 21481225/(2+1+4+8+1+2+2+5) = 859249, 21481226/(2+1+4+8+1+2+2+6) = 826201 and 21481227/(2+1+4+8+1+2+2+7) = 795601 are all primes.
		

Crossrefs

Subsequence of A001101, A085775, A141769 and A334371.
Cf. A235397.

Programs

  • Mathematica
    moranQ[n_] := PrimeQ[n / Plus @@ IntegerDigits[n]]; m = moranQ /@ Range[4]; seq = {}; Do[If[And @@ m, AppendTo[seq, k - 4]]; m = Join[Rest[m], {moranQ[k]}], {k, 5, 3 * 10^7}]; seq

A334373 Starts of runs of 5 consecutive Moran numbers (A001101).

Original entry on oeis.org

25502420, 5301223225, 13242121221, 32005512020, 74761736450, 213415171233, 221221400424, 232212103220, 243857053493, 685392911334, 732258727252, 889011113804, 905191111482, 1013460525033, 1080719141080, 1229198438214, 1461057000513, 1961972092132, 2157993351414
Offset: 1

Views

Author

Amiram Eldar, Apr 25 2020

Keywords

Examples

			25502420 is a term since 25502420, 25502421, 25502422, 25502423 and 25502424 are all Moran numbers.
		

Crossrefs

Subsequence of A001101, A085775, A330928, A334371 and A334372.
Cf. A235397.

Programs

  • Mathematica
    moranQ[n_] := PrimeQ[n / Plus @@ IntegerDigits[n]]; m = moranQ /@ Range[5]; seq = {}; Do[If[And @@ m, AppendTo[seq, k - 5]]; m = Join[Rest[m], {moranQ[k]}], {k, 6, 10^8}]; seq

Extensions

Terms a(6) and beyond from Giovanni Resta, Apr 27 2020
Showing 1-6 of 6 results.