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.

Previous Showing 11-20 of 20 results.

A334416 Numbers m such that (m / sum of digits of m) is a palindrome.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 18, 21, 24, 27, 36, 42, 45, 48, 54, 63, 72, 81, 84, 110, 132, 198, 220, 264, 330, 396, 440, 550, 594, 605, 660, 715, 770, 792, 825, 880, 935, 990, 1010, 1056, 1188, 1212, 1310, 1386, 1452, 1584, 1782, 1810, 1812, 1815, 1818, 1848
Offset: 1

Views

Author

Bernard Schott, Apr 28 2020

Keywords

Comments

Not to be confused with A114440 whose first 23 terms are identical to the terms of this sequence, while A114440(24) = 108 and a(24) = 110.

Examples

			The number 264 is a term of the sequence because it is divisible by the sum of its digits: 2+6+4=12; 264/12=22 and 22 is a palindrome.
		

Crossrefs

Cf. A001101 (similar for primes).
Cf. A334417 (resulting palindromic quotients).
Subsequence of A005349 (Niven (or Harshad) numbers).
Subsequence: A276142 (palindromic terms).

Programs

  • Mathematica
    Select[Range[2000], PalindromeQ[# / Plus @@ IntegerDigits[#]] &] (* Amiram Eldar, Apr 28 2020 *)
  • PARI
    isok(m) = iferr(my(d=digits(m/sumdigits(m))); d==Vecrev(d), E, 0); \\ Michel Marcus, Apr 29 2020

A337448 The numbers k for which Fibonacci(k) are Niven numbers.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 8, 12, 18, 36, 54, 72, 84, 112, 120, 144, 160, 180, 198, 200, 216, 240, 243, 264, 286, 288, 299, 324, 358, 360, 468, 504, 528, 540, 576, 648, 720, 780, 816, 1008, 1020, 1044, 1200, 1248, 1260, 1500, 1602, 1824, 1872, 1917, 2160, 2184, 2760
Offset: 1

Views

Author

Marius A. Burtea, Sep 14 2020

Keywords

Comments

For a(7) = 8, Fibonacci(8) = 21 and 21/digsum(21) = 7 is a prime number, so Fibonacci(8) is a Moran number (A001101). It seems that this is the only Moran number among the first 100000 Fibonacci numbers.

Examples

			Fibonacci(1) = 1 = A005349(1), so 1 is a term.
Fibonacci(8) = 21 = A005349(14), so 8 is a term.
Fibonacci(12) = 144 = A005349(8), so 12 is a term.
Fibonacci(18) = 2584 = A005349(514), so 18 is a term.
		

Crossrefs

Programs

  • Magma
    niven:=func; [k:k in [1..2760]| niven(Fibonacci(k))];
    
  • Mathematica
    nivenQ[n_] := Divisible[n, Plus @@ IntegerDigits[n]]; Select[Range[3000], nivenQ[Fibonacci[#]] &] (* Amiram Eldar, Sep 15 2020 *)
  • PARI
    isok(k) = my(f=fibonacci(k)); (f % sumdigits(f)) == 0; \\ Michel Marcus, Sep 15 2020

A130338 Primes p with no solution x to x=p*digitsum(x).

Original entry on oeis.org

173, 383, 431, 443, 461, 491, 521, 563, 761, 821, 827, 839, 941, 971, 983, 1049, 1481, 1487, 1493, 1499, 1553, 1571, 1601, 1811, 1871, 1931, 2153, 2207, 2477, 2591, 2609, 2753, 3037, 3041, 3083, 3137, 3221, 3251, 3257, 3307, 3329, 3371
Offset: 1

Views

Author

Lekraj Beedassy, Aug 07 2007

Keywords

Comments

Primes p such that no number is p times its digit sum.
These may be called the non-Moran primes because no index k exists in A001101 to represent them as A001101(k)/digitsum[A001101(k)]. - R. J. Mathar, Aug 10 2007

Examples

			p=5743 is not in the sequence because it can be represented as p=40201/7 (x=40201) or as p=80402/14 (x=80402).
p=7 is not in the sequence because it can be represented as p=21/3 (x=21) or p=42/6 (x=42) or p=63/9 (x=63) or p=84/12 (x=84). In all cases, the denominators are the digit sums of the numerators.
		

Crossrefs

Programs

  • Maple
    A007953 := proc(n) option remember ; add(j,j=convert(n,base,10)) ; end: A001101 := proc(p) option remember : local k,digs ; digs := 1; if not isprime(p) then RETURN(-1) ; else while 10^(digs-1)/(9*digs) <= p do for k from max(p,10^(digs-1)) to 10^digs do if k = p*A007953(k) then RETURN(k) ; fi ; od ; digs := digs+1 ; od: RETURN(-1) ; fi ; end: for n from 1 to 500 do if A001101(ithprime(n)) = -1 then printf("%d,",ithprime(n)) ; fi : od: # R. J. Mathar, Aug 10 2007
  • Python
    from itertools import count, islice, combinations_with_replacement
    from sympy import nextprime
    def A130338_gen(startvalue=1): # generator of terms >= startvalue
        n = nextprime(max(startvalue,1)-1)
        while True:
            for l in count(1):
                if 9*l*n < 10**(l-1):
                    yield n
                    break
                for d in combinations_with_replacement(range(10),l):
                    if (s:=sum(d))>0 and sorted(str(s*n)) == [str(e) for e in d]:
                        break
                else:
                    continue
                break
            n = nextprime(n)
    A130338_list = list(islice(A130338_gen(),20)) # Chai Wah Wu, May 09 2023

Formula

A000040 MINUS {A001101(k)/A007953(A001101(k)): k=1,2,3,4,..}. A003635 INTERSECT A000040. - R. J. Mathar, Aug 10 2007

Extensions

More terms from R. J. Mathar, Aug 10 2007

A334344 Binary Moran numbers: numbers k such that k divided by its binary weight (A000120) is a prime number.

Original entry on oeis.org

2, 6, 10, 21, 34, 55, 69, 92, 115, 116, 155, 172, 185, 205, 212, 222, 246, 284, 295, 318, 321, 332, 355, 356, 366, 395, 404, 438, 452, 474, 498, 514, 535, 556, 565, 596, 606, 623, 652, 749, 788, 822, 835, 865, 889, 905, 973, 978, 1041, 1052, 1076, 1086, 1108, 1124
Offset: 1

Views

Author

Amiram Eldar, Apr 23 2020

Keywords

Examples

			2 is a term since its binary weight is 1 and 2/1 = 2, which is a prime number.
6 (110 in binary) has a binary weight of 2 and 6/2 = 3, which is prime, so 6 is also in the sequence. Likewise 10 (1010 in binary) also has a binary weight of 2, and 10/2 = 5, which is prime, so 10 is also in the sequence.
14 (1110 in binary) has binary weight of 3. But 14/3 is not prime, so 14 is not in the sequence.
		

Crossrefs

Subsequence of A049445.

Programs

  • Maple
    q:= n-> (p-> is(p, integer) and isprime(p))(n/add(i, i=Bits[Split](n))):
    select(q, [$1..1200])[];  # Alois P. Heinz, Apr 23 2020
  • Mathematica
    Select[Range[1000], PrimeQ[# / DigitCount[#, 2, 1]] &]
  • PARI
    isok(m) = iferr(isprime(m/hammingweight(m)), E, 0); \\ Michel Marcus, Apr 24 2020
  • Scala
    def isPrime(num: Int): Boolean = Math.abs(num) match {
      case 0 => false; case 1 => false; case n => (2 to Math.floor(Math.sqrt(n)).toInt) forall (p => n % p != 0)
    }
    (1 to 1000).filter{ n => val binWt = Integer.bitCount(n); (n % binWt) == 0 && isPrime(n / binWt) } // Alonso del Arte, Apr 23 2020
    

A337449 The numbers k for which Lucas(k) are Niven numbers.

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 12, 18, 56, 81, 130, 225, 396, 637, 854, 2034, 4059, 4095, 5985, 7650, 21105, 31059, 41998, 46860, 83106, 114129, 120555, 150705, 201285, 287937, 338265, 359757, 475839, 512194, 583825, 606594, 627102, 717025, 877305, 922095, 991590, 1076355
Offset: 1

Views

Author

Marius A. Burtea, Sep 14 2020

Keywords

Comments

For a(6) = 6, Lucas(6) = 18 and 18/digsum(18) = 2 is a prime number, so Lucas(6) is a Moran number (A001101).
For a(9) = 56, Lucas(56) = 505019158607 and 505019158607/digsum(505019158607) = 10745088481 is a prime number, so Lucas(56) is a Moran number.

Examples

			Lucas(0) = 2 = A005349(2), so 0 is a term.
Lucas(1) = 1 = A005349(1), so 1 is a term.
Lucas(6) = 12 = A005349(11), so 6 is a term.
Lucas(12) = 322 = A005349(90), so 12 is a term.
Lucas(18) = 5778 = A005349(1013), so 18 is a term.
		

Crossrefs

Programs

  • Magma
    niven:=func; [k:k in [0..70000]|niven(Lucas(k))];
    
  • Mathematica
    nivenQ[n_] := Divisible[n, Plus @@ IntegerDigits[n]]; Select[Range[6000], nivenQ[LucasL[#]] &] (* Amiram Eldar, Sep 15 2020 *)
  • PARI
    isok(k) = my(l=real((2+quadgen(5))*quadgen(5)^k)); (l % sumdigits(l)) == 0; \\ Michel Marcus, Sep 15 2020
    
  • Python
    A337449_list, k, p, q = [], 0, 2, 1
    while k < 10**6:
        if p % sum(int(d) for d in str(p)) == 0:
            A337449_list.append(k)
        k += 1
        p, q = q, p+q # Chai Wah Wu, Sep 17 2020

A108780 Numbers n such that (n / sum of digits of n) is a golden semiprime.

Original entry on oeis.org

54, 135, 1122, 1386, 2244, 2805, 3366, 3927, 4488, 5301, 12369, 15318, 20445, 22977, 24534, 28623, 44979, 58941, 74169, 78588, 98892, 131454, 153363, 175272, 197181, 210693, 213206, 222132, 240792, 240999, 270891, 274122, 304580, 335038, 350267
Offset: 1

Views

Author

Jason Earls, Jun 26 2005

Keywords

Examples

			1122 is a term because 1122/6=187 and 187=11*17 and 11*phi-17 = 0.798373... < 1.
		

Crossrefs

Programs

  • Mathematica
    goldQ[n_] := Module[{f = FactorInteger[n]}, If[Length[f] != 2, False, If[Max[f[[;;,2]]] != 1, False, Abs[f[[2,1]] - f[[1,1]] * GoldenRatio] < 1]]]; sumDigits[n_] := Plus @@ IntegerDigits[n]; seqQ[n_] := Divisible[n, (sd = sumDigits[n])] && goldQ[n/sd]; Select[Range[360000], seqQ] (* Amiram Eldar, Nov 29 2019 *)

A337752 a(n) is the smallest Moran number m for which m/digsum(m) = prime(n) or 0 if no such number exists.

Original entry on oeis.org

18, 27, 45, 21, 198, 117, 153, 114, 207, 261, 372, 111, 738, 516, 423, 954, 531, 732, 201, 1278, 511, 711, 1494, 801, 1164, 1818, 1236, 1926, 1090, 1017, 1016, 2358, 1233, 1251, 1341, 1812, 1413, 1141, 1503, 0, 1611, 1810, 3438, 2316, 3546, 3184, 2532, 2007
Offset: 1

Views

Author

Marius A. Burtea, Sep 18 2020

Keywords

Comments

If prime(k) is in A130338 then a(k) = 0.

Examples

			A001101(1) = 18 and 18 / digsum(18) = 18/9 = 2 = prime(1), so a(1) = 18.
A001101(2) = 21 and 21 / digsum(21) = 21/3 = 7 = prime(4), so a(4) = 21.
A001101(3) = 27 and 27 / digsum(27) = 27/9 = 3 = prime(2), so a(2) = 27.
A001101(5) = 45 and 45 / digsum(45) = 45/9 = 5 = prime(3), so a(3) = 45.
A130338(1) = 173 = prime(40), so a(40) = 0.
		

Crossrefs

Cf. A001101 (Moran numbers), A007953 (digsum), A130338.

Programs

  • Magma
    f:=func; a:=[]; for n in [1..50] do m:=NthPrime(n); while m le 9*NthPrime(n)*(Log(10,m)+1) and not f(n,m) do m:=m+NthPrime(n); end while; if (m div &+Intseq(m) eq NthPrime(n)) then Append(~a,m); else Append(~a,0); end if; end for; a;

A333457 a(n) is the smallest number with exactly n divisors that are Moran numbers, or -1 if no such number exists.

Original entry on oeis.org

18, 42, 84, 126, 252, 756, 1998, 1596, 2394, 4662, 4788, 9324, 18648, 23940, 46620, 93240, 139860, 177156, 559440, 354312, 708624, 1062936, 885780, 4606056, 1771560, 3543120, 5314680, 10629360, 38974320, 23030280, 46060560, 69090840, 138181680, 506666160
Offset: 1

Views

Author

Marius A. Burtea, May 03 2020

Keywords

Comments

m is a Moran number if (m / sum of digits of m) is prime (A001101).
Conjecture: For every n there is at least one number k with n divisors Moran numbers.
Conjecture: The terms are divisible by 6.
a(1) = 18, a(2) = 42 and a(3) = 84 are Moran numbers. Not all terms in the sequence are Moran numbers. For example: a(4) = 126 has digsum(126) = 9 and 126 / 9 = 14. Also, the terms a(5) - a(34) are not Moran numbers.

Examples

			Of the divisors of 18 (1, 2, 3, 6, 9, 18), only 18 is a Moran number: 18 / digsum (18) = 2.
Of the divisors of 84 (1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84), only 21, 42 and 84 are Moran numbers: 21 / digsum (21) = 7, 42 / digsum (42) = 7 and 84 / digsum (84) = 7.
		

Crossrefs

Cf. A001101, A007953 (sum of digits), A333456.

Programs

  • Magma
    a:=[]; for n in [1..20] do m:=1; while #[d:d in Divisors(m)|d mod &+Intseq(d) eq 0 and IsPrime(d div &+Intseq(d))] ne n do m:=m+1; end while; Append(~a,m); end for; a;
  • Mathematica
    numDiv[n_] := DivisorSum[n, 1 &, PrimeQ[#/Plus @@ IntegerDigits[#]] &]; a[n_] := Module[{k = 1}, While[numDiv[k] != n, k++]; k]; Array[a, 20] (* Amiram Eldar, May 11 2020 *)

A337731 a(n) is the smallest k >= 1 such that k*n is a Moran number.

Original entry on oeis.org

18, 9, 6, 21, 9, 3, 3, 19, 2, 19, 18, 7, 9, 3, 3, 37, 9, 1, 6, 199, 1, 9, 9, 37, 199, 6, 1, 3, 9, 1663, 12, 937, 6, 1117, 1657, 1361, 3, 3, 3, 17497, 18, 1, 12, 10909, 1, 14563, 9, 18541, 17551, 199999, 3, 3, 18, 87037, 1108909, 157141, 2, 154981, 9, 1483333
Offset: 1

Views

Author

Marius A. Burtea, Sep 18 2020

Keywords

Comments

m is a Moran number if m /digsum(m) is a prime number (A001101).
a(n) = 1 if and only if n is a Moran number.

Examples

			For n = 6, (1*6) / digsum(1*6) = 1, (2*6) / digsum(2*6) = 12 / 3 = 4, (3*6) / digsum(3*6) = 18 / 9 = 2 = prime(1), so a(6) = 3.
For n = 7, (1*7) / digsum(1*7) = 1, (2*7) / digsum(2*7) = 14 / 5, (3*7) / digsum(3*7) = 21 / 3 = 7 = prime(4), so a(7) = 3.
		

Crossrefs

Programs

  • Magma
    moran:=func;
    a:=[]; for n in [1..60] do k:=1; while not moran(k*n) do k:=k+1; end while; Append(~a,k); end for; a;
  • Mathematica
    moranQ[n_] := PrimeQ[n / Plus @@ IntegerDigits[n]]; a[n_] := Module[{k = 1}, While[!moranQ[k*n], k++]; k]; Array[a, 60] (* Amiram Eldar, Sep 19 2020 *)

A337862 a(n) is the smallest number that can be partitioned into n ways as the sum of two Moran numbers.

Original entry on oeis.org

0, 36, 63, 174, 198, 306, 312, 399, 1176, 930, 1296, 1989, 1110, 888, 2190, 1896, 2688, 3990, 3630, 3090, 3696, 3810, 8316, 6870, 4710, 12420, 11340, 9180, 13350, 12990, 14070, 14364, 14970, 9900, 15444, 14790, 15012, 18570, 19980, 25164, 23610, 25092, 23790
Offset: 0

Views

Author

Marius A. Burtea, Oct 21 2020

Keywords

Examples

			0 cannot be written as the sum of two Moran numbers because A001101(1) = 18, so 0 is a term and a(0) = 0.
36 = 18 + 18 = A001101(1) + A001101(1), so a(1) = 36.
63 = 18 + 27 = A001101(1) + A001101(5) and 63 = 21 + 42 = A001101(2) + A001101(4), so a(2) = 63.
174 = 18 + 156 = 21 + 153 = 63 + 111 and 18, 21, 63, 111, 153, 156 are in A001101, so a(3) = 174.
198 = 27 + 171 = 42 + 156 = 45 + 153 = 84 + 114 and 27, 42, 45, 84, 153, 156, 171 are in A001101, so a(4) = 198.
		

Crossrefs

Programs

  • Magma
    a:=[]; moran:=func; v:={m:m in [1..40000]|moran(m)}; for n in [0..40] do k:=0; while #RestrictedPartitions(k,2,v) ne n do k:=k+1; end while; Append(~a,k); end for; a;
  • Mathematica
    m = 60000; morans = Select[Range[m], PrimeQ[#/Plus @@ IntegerDigits[#]] &]; mx = 43; s = Table[-1, {mx}]; n = 0; c = 0; While[c < mx && n <= m, If[(i = Length[IntegerPartitions[n, {2}, morans]] + 1) <= mx && s[[i]] == -1, c++; s[[i]] = n]; n++]; s (* Amiram Eldar, Oct 21 2020 *)
Previous Showing 11-20 of 20 results.