OFFSET
1,1
COMMENTS
9 is the multiplicative unit. A number is a lunar prime if it is not a lunar product (see A087062 for definition) r*s where neither r nor s is 9.
All lunar primes must contain a 9, so this is a subsequence of A011539.
Also, numbers k such that the lunar sum of the lunar prime divisors of k is k. - N. J. A. Sloane, Aug 23 2010
We have changed the name from "dismal arithmetic" to "lunar arithmetic" - the old name was too depressing. - N. J. A. Sloane, Aug 06 2014
(Lunar) composite numbers are not necessarily a product of primes. (For example 1 = 1*x for any x in {1, ..., 9} is not a prime but can't be written as the product of primes.) Therefore, to establish primality, it is not sufficient to consider only products of primes; one has to consider possible products of composite numbers as well. - M. F. Hasler, Nov 16 2018
LINKS
David Applegate and N. J. A. Sloane, Table of n, a(n) for n = 1..22095 [all primes with at most 5 digits]
D. Applegate, C program for lunar arithmetic and number theory
D. Applegate, M. LeBrun and N. J. A. Sloane, Dismal Arithmetic, arXiv:1107.1130 [math.NT], 2011.
Brady Haran and N. J. A. Sloane, Primes on the Moon (Lunar Arithmetic), Numberphile video, Nov 2018.
FORMULA
The set { m in A011539 | 9<m<100 or A054054(m) < min(A000030(m),A010879(m)) } (9ish numbers A011539 with 2 digits or such that the smallest digit is strictly smaller than the first and the last digit) is equal to this sequence up to a(1656) = 10099. The next larger 9ish number 10109 is also in that set but is the lunar square of 109, thus not in this sequence of primes. - M. F. Hasler, Nov 16 2018
EXAMPLE
8 is not prime since 8 = 8*8. 9 is not prime since it is the multiplicative unit. 10 is not prime since 10 = 10*8. Thus 19 is the smallest prime.
PROG
(PARI) A87097=select( is_A087097(n)={my(d); if( n<100, n>88||(n%10==9&&n>9), vecmax(d=digits(n))<9, 0, #d<5, vecmin(d)<min(d[1], d[#d]), my(m); !for(L=#d\/2, #d-1, forvec(v=vector(L, i, [i==1, 9]), vecmax(n)<9&&next; m=fromdigits(v); for(k=10^(#d-L), 10^(#d-L+1)-1, A087062(m, k)==n&&return))))}, [1..999]) \\ M. F. Hasler, Nov 16 2018
CROSSREFS
KEYWORD
nonn,easy,base
AUTHOR
Marc LeBrun, Oct 20 2003
STATUS
approved