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.

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;