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 27 results. Next

A087638 Number of lunar primes with <= n digits.

Original entry on oeis.org

0, 18, 99, 1638, 22095, 264312, 3159111, 36694950, 418286661
Offset: 1

Views

Author

Marc LeBrun and N. J. A. Sloane, Oct 26 2003

Keywords

Comments

Partial sums of A087636. - M. F. Hasler, Nov 15 2018

Crossrefs

Cf. A087062 (lunar product), A087097 (lunar primes), A087636 (#{n-digit primes}).

Programs

Extensions

a(6)-a(9) from David Applegate, Nov 07 2003

A088469 Number of distinct lunar prime divisors of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 17, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 15, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

David Applegate, Nov 11 2003

Keywords

Comments

a(n) is the number of lunar primes p that are lunar divisors of n. (Multiplicity is not taken into account. Each prime is counted at most once.)

Examples

			10 = 9*90 and 90 is prime. 90 is the only prime divisor of 10, so a(10) = 1.
		

Crossrefs

A134211 Numbers that are lunar products of exactly 3 lunar primes.

Original entry on oeis.org

1119, 1129, 1139, 1149, 1159, 1169, 1179, 1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1229, 1239, 1249, 1259, 1269, 1279, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1339, 1349, 1359, 1369, 1379, 1389, 1390
Offset: 1

Views

Author

N. J. A. Sloane, Aug 14 2010

Keywords

Comments

A subsequence of A087984.

Crossrefs

A088470 Lunar sum of distinct lunar prime divisors of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 90, 99, 19, 19, 19, 19, 19, 19, 19, 19, 90, 91, 99, 29, 29, 29, 29, 29, 29, 29, 90, 91, 92, 99, 39, 39, 39, 39, 39, 39, 90, 91, 92, 93, 99, 49, 49, 49, 49, 49, 90, 91, 92, 93, 94, 99, 59, 59, 59, 59, 90, 91, 92, 93, 94, 95, 99, 69, 69, 69
Offset: 1

Views

Author

David Applegate, Nov 11 2003

Keywords

Comments

a(n) = Sum_{p is a lunar divisor of n} p. (Each prime appears at most once in this sum.)

Crossrefs

A171004 Numbers which are the lunar product of lunar primes in more than one way.

Original entry on oeis.org

1119, 1129, 1139, 1149, 1159, 1169, 1179, 1189, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1219, 1319, 1419, 1519, 1619, 1719, 1819, 1911, 1912, 1913, 1914, 1915, 1916, 1917, 1918, 1919, 2191, 2229, 2239, 2249, 2259, 2269, 2279, 2289, 2292, 2293, 2294, 2295, 2296, 2297, 2298, 2299, 2329, 2429, 2529, 2629, 2729, 2829, 2911, 2922, 2923, 2924, 2925, 2926, 2927, 2928
Offset: 1

Views

Author

N. J. A. Sloane, Sep 01 2010

Keywords

Examples

			1119 = 19*109 = 19*19*19.
1129 = 19*129 = 29*109 = 19*19*29.
		

Crossrefs

A171119 The 1539 four-digit lunar primes.

Original entry on oeis.org

1009, 1019, 1029, 1039, 1049, 1059, 1069, 1079, 1089, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1109, 1209, 1309, 1409, 1509, 1609, 1709, 1809, 1901, 1902, 1903, 1904, 1905, 1906, 1907, 1908, 1909, 2009, 2019, 2029, 2039
Offset: 1

Views

Author

N. J. A. Sloane, Sep 28 2010

Keywords

Crossrefs

A finite subsequence of A087097. Cf. A171121.

A088574 Representative lunar primes.

Original entry on oeis.org

19, 90, 99, 109, 901, 902, 909, 1009, 1019, 1029, 1091, 1092, 1099, 1109, 1209, 1901, 1902, 1909, 2019, 2091, 2109, 2901, 9001, 9009, 9011, 9012, 9019, 9021, 9091, 9099, 9101, 9102, 9109, 9201, 9901, 9909, 10009, 10019, 10029, 10091, 10092, 10099
Offset: 1

Views

Author

N. J. A. Sloane and David Applegate, Nov 18 2003

Keywords

Comments

Let P = ...9..9ij...kl9...9... be a lunar prime (A087097), where the digits ij...kl are a typical string of consecutive digits that are not 9. Any number Q obtained from P by replacing ij...kl by other non-9-ish digits with the same order relationship as ij...kl is also prime. Sequence gives lexicographically earliest member of each such equivalence class.
It is necessary to consider order relations of all non-9 digits, not just consecutive ones. For example, 9091 is prime, but 9491 = 91*949. - David Wasserman, Aug 11 2005

Examples

			109, 209, 219, 309, 319, 329, 409, 419, ..., 879 are all lunar primes in the same class, ij9 with i>j, of which 109 is the earliest.
		

Crossrefs

Cf. A087097.

Extensions

More terms from David Wasserman, Aug 11 2005

A171121 The 81 three-digit lunar primes.

Original entry on oeis.org

109, 209, 219, 309, 319, 329, 409, 419, 429, 439, 509, 519, 529, 539, 549, 609, 619, 629, 639, 649, 659, 709, 719, 729, 739, 749, 759, 769, 809, 819, 829, 839, 849, 859, 869, 879, 901, 902, 903, 904, 905, 906, 907, 908, 909, 912, 913, 914, 915, 916, 917, 918, 919, 923, 924, 925, 926, 927, 928, 929, 934, 935, 936, 937, 938, 939, 945, 946, 947, 948, 949, 956, 957, 958, 959, 967, 968, 969, 978, 979, 989
Offset: 1

Views

Author

N. J. A. Sloane, Sep 28 2010

Keywords

Crossrefs

A finite subsequence of A087097. CF. A171119.

A342676 a(n) is the number of lunar primes less than or equal to n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7
Offset: 1

Views

Author

Ya-Ping Lu, Mar 18 2021

Keywords

Comments

The density of lunar primes seems to approach a nonzero fraction in contrast to that of the classical primes, which approaches zero as n tends to infinity. a(n) and lunar prime density, a(n)/n, for n up to 10^9 are
n 1 10 100 1000 10000 100000 1000000 10000000 100000000 1000000000
a(n) 0 0 18 99 1638 22095 264312 3159111 36694950 418286661
a(n)/n 0 0 0.18 0.099 0.164 0.221 0.264 0.316 0.367 0.418
Conjecture 1: Base 10 lunar prime density approaches 0.9 as n tends to infinity, or lim{n->oo} a(n)/n = 0.9.
D. Applegate, M. LeBrun and N. J. A. Sloane conjectured that the number of base b lunar primes with k digits approaches (b-1)^2*b^(k-2) as k tends to infinity. And necessary conditions for a number n to be prime are that it contain b-1 as a digit and (if k > 2) does not end with 0 (see Links). Since the number of base b integers with k digits equals b^k - b^(k-1), the lunar prime density among integers with k digits should be (b-1)^2*b^(k-2)/(b^k - b^(k-1)), which is 1 - 1/b as k -> oo, if the conjecture holds. Note that, as b increases, the limit approaches 1, or lim_{b->oo} lim_{n->oo} a(n)/n = 1. As n tends to infinity, the probability of finding a base b number having a digit of b-1 approaches 100%, and the probability of finding a base b number ending with 0 approaches 1/b. Therefore, essentially all numbers except those ending with 0 are lunar primes as n tends to infinity.
Conjecture 2: Base b lunar prime density approaches 1 - 1/b as n tends to infinity, or lim{n->oo} a(n)/n = 1 - 1/b.

Crossrefs

Programs

  • Python
    def addn(m1, m2):
        s1, s2 = str(m1), str(m2)
        len_max = max(len(s1), len(s2))
        return int(''.join(max(i, j) for i, j in zip(s1.rjust(len_max, '0'), s2.rjust(len_max, '0'))))
    def muln(m1, m2):
        s1, s2, prod = str(m1), str(m2), '0'
        for i in range(len(s2)):
            k = s2[-i-1]
            prod = addn(int(str(prod)), int(''.join(min(j, k) for j in s1))*10**i)
        return prod
    m = 1; m_size = 2; a = 0; L_im = [9]
    while m <= 10**m_size:
        for i in range(1, m + 1):
            if i == 9: continue
            im_st = str(muln(i, m)); im = int(im_st); im_len = len(im_st)
            if im_len > m_size: break
            if im not in L_im: L_im.append(im)
        if m not in L_im: a += 1
        print(a); m += 1

A342678 a(n) is the number of base-2 lunar primes less than or equal to n.

Original entry on oeis.org

0, 1, 2, 2, 3, 3, 3, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 22, 22, 23, 23, 24
Offset: 1

Views

Author

Ya-Ping Lu, Mar 18 2021

Keywords

Comments

a(n) and base-2 lunar prime density, a(n)/n, for some n up to 2^39 are
k n = 2^k a(n) a(n)/n
-- ------------ ------------ ----------
1 2 1 0.5
5 32 11 0.34375
10 1024 323 0.31542...
15 32768 5956 0.35430...
20 1048576 424816 0.40513...
25 33554432 14871345 0.44320...
30 1073741824 502585213 0.46806...
35 34359738368 16593346608 0.48292...
39 549755813888 269325457277 0.48990...
Conjecture: base-2 lunar prime density approaches 0.5 as n tends to infinity, i.e., lim_{n->oo} a(n)/n = 0.5 (see Comments section in A342676).
a(n) is the n-th partial sum of A342704.

Crossrefs

Programs

  • Python
    def addn(m1, m2):
        s1, s2 = bin(m1)[2:].zfill(0), bin(m2)[2:].zfill(0)
        len_max = max(len(s1), len(s2))
        return int(''.join(max(i, j) for i, j in zip(s1.rjust(len_max, '0'), s2.rjust(len_max, '0'))))
    def muln(m1, m2):
        s1, s2, prod = bin(m1)[2:].zfill(0), bin(m2)[2:].zfill(0), '0'
        for i in range(len(s2)):
            k = s2[-i-1]
            prod = addn(int(str(prod), 2), int(''.join(min(j, k) for j in s1), 2)*2**i)
        return prod
    m = 1; m_size = 7; a = 0; L_im = [1]
    while m <= 2**m_size:
        for i in range(2, m + 1):
            im_st = str(muln(i, m)); im = int(im_st, 2); im_len = len(im_st)
            if im_len > m_size: break
            if im not in L_im: L_im.append(im)
        if m not in L_im: a += 1
        print(a); m += 1
Previous Showing 11-20 of 27 results. Next