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-5 of 5 results.

A086107 Prime members of A086108: Prime numbers which have the additional property that all symmetric polynomials of their digits are also prime numbers.

Original entry on oeis.org

2, 3, 5, 7, 113, 131, 151, 311
Offset: 1

Views

Author

Zak Seidov, Jul 10 2003

Keywords

Comments

This sequence is finite and all members are listed here. For a proof, see comments for A086108. - Adam M. Kalman (mocha(AT)clarityconnect.com), Nov 18 2004

Examples

			151 is in the sequence because it is prime and all symmetric polynomials of the set {1,5,1} (i.e. 1+5+1=7, 1*5+5*1+1*1=11 and 1*5*1=5) are all prime.
		

Crossrefs

Extensions

Edited by Adam M. Kalman (mocha(AT)clarityconnect.com), Nov 18 2004

A086108 Numbers n with the following property: Every symmetric polynomial of the digits of n is prime. (A symmetric polynomial is unchanged by any permutation of its variables, so the symmetric polynomials of {a,b,c} would be a+b+c,ab+bc+ac and abc.)

Original entry on oeis.org

2, 3, 5, 7, 12, 21, 113, 115, 131, 151, 311, 511
Offset: 1

Views

Author

Zak Seidov, Jul 10 2003

Keywords

Comments

Comments from Adam M. Kalman (mocha(AT)clarityconnect.com), Nov 18 2004: (Start)
The k-th symmetric polynomial of {a1,a2,a3,...an} can also be thought of as the coefficient of x^(n-k) in the binomial expansion of (x-a1)(x-a2)...(x-an).
Derivation of full sequence: First, no member of this sequence can contain a composite digit, or else the last symmetric polynomial (the product of its digits) will be composite. Second, no member may contain more than one prime digit, for the same reason. Third, any member will have all permutations of its digits also in the sequence.
Therefore in order to find members of this sequence, we need only examine the sets of digits {1,1,1,...,1,p}, where p is either 2,3,5, or 7 (the prime digits) and there are n ones in the set. In the cases of these sets, it is easy to see what the symmetric polynomials are:
The number of times p appears in the k-th symmetric polynomial is binomial[n,k-1] and the number of times p doesn't appear is binomial[n,k]. Therefore the k-th symmetric polynomial of this set is p*binomial[n,k-1]+binomial[n,k]. But now consider the sets with n>2. Observe that the second symmetric polynomial is given by substituting k=2 into the above formula:
q = p*binomial[n,1]+binomial[n,2] = pn+(n)(n-1)/2. If n is even, then q can be factored nontrivially into integers: (n/2)(2p+n-1). If n is odd, then q can be factored nontrivially as well: (n)(p+(n-1)/2). Therefore in these cases q (the second symmetric polynomial) is always composite and so no set with n>2 (i.e., containing more than 2 ones) can have the desired property.
This means that we only have to examine sets with 0, 1 and 2 ones and so we immediately see that the sequence is finite and short. Furthermore, examining these 12 sets ({2},{3},{5},{7},{1,2},{1,3},{1,5},{1,7},{1,1,2},{1,1,3},{1,1,5},{1,1,7}), we immediately eliminate sets whose sums (the first symmetric polynomial) are composite, leaving only ({2},{3},{5},{7},{1,2},{1,1,3},{1,1,5}) for consideration.
A minute of calculation shows that these seven sets all have the desired property and so the full sequence consists of all integers whose digits are permutations of those seven sets: 2,3,5,7,12,21,113,115,131,151,311,511. (End)

Examples

			The number 131 is in the sequence because every symmetric polynomial of {1,3,1} is prime: 1+3+1=5, 1*3+3*1+1*1=7 and 1*3*1=3 are all prime.
		

Crossrefs

Extensions

Corrected by Adam M. Kalman (mocha(AT)clarityconnect.com), Nov 30 2004

A086259 Primes with at least four digits such that sum of any three_neighbor_digits is prime; first and last digits are neighbors.

Original entry on oeis.org

1151, 1193, 1319, 1373, 1511, 1733, 1913, 1931, 1973, 2003, 3119, 3137, 3191, 3371, 3559, 3719, 3779, 3797, 3911, 3917, 5953, 7193, 7331, 7793, 7937, 9137, 9173, 9311, 9371, 9377, 10111, 11113, 11119, 11131, 11311, 11551, 13313, 13913, 15511, 19139, 19319
Offset: 1

Views

Author

Zak Seidov, Jul 26 2003

Keywords

Comments

Because 3-digit terms coincide with additive 3-dimensional primes A046713, it is interesting to start with 4-digit primes. All of them may use only zero and odd digits, with the unique exclusion 2003 with one even digit. Primes such that sum of any two_neighbor_digits is prime A086244.

Examples

			1973 is a term because 1+9+7=17, 9+7+3=19, 7+3+1=11 and 3+1+9=13 are all prime.
		

Crossrefs

Extensions

More terms from Alois P. Heinz, May 10 2016

A225863 Primes for which both sum and product of digits are nonprimes.

Original entry on oeis.org

19, 37, 53, 59, 73, 79, 97, 103, 107, 109, 127, 149, 163, 167, 181, 233, 239, 251, 257, 271, 277, 293, 307, 347, 349, 367, 383, 389, 419, 431, 433, 439, 457, 479, 491, 499, 503, 509, 521, 523, 541, 547, 563, 569, 587, 613, 617, 619, 631, 653, 659, 673
Offset: 1

Views

Author

Jayanta Basu, May 18 2013

Keywords

Examples

			79 is a member since neither 7 + 9 = 16 nor 7 * 9 = 63 is prime.
		

Crossrefs

Cf. A046713.

Programs

  • Mathematica
    d[n_]:=IntegerDigits[n]; Select[Prime[Range[122]],!PrimeQ[Plus@@(x=d[#])] && !PrimeQ[Times@@x] &]
    Select[Prime[Range[150]],NoneTrue[{Total[IntegerDigits[#]],Times@@ IntegerDigits[ #]},PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 20 2020 *)

A225864 Composite numbers for which both sum and product of digits are primes.

Original entry on oeis.org

12, 21, 115, 511, 1112, 1121, 1211, 11711, 13111, 17111, 31111, 71111, 111112, 121111, 211111, 1111115, 1111117, 1111171, 1111511, 1115111, 1151111, 1511111, 1711111, 5111111, 7111111, 111111115, 111111151, 111111311, 111111511, 111115111, 111131111, 111151111
Offset: 1

Views

Author

Jayanta Basu, May 18 2013

Keywords

Crossrefs

Programs

  • Mathematica
    d[n_] := IntegerDigits[n]; t={}; Do[If[!PrimeQ[n] && PrimeQ[Plus@@(x=d[n])] && PrimeQ[Times@@x], AppendTo[t,n]], {n,2*10^6}]; t
    Select[Range[72*10^5],CompositeQ[#]&&AllTrue[{Total[IntegerDigits[#]],Times@@ IntegerDigits[ #]},PrimeQ]&] (* The program generates the first 25 terms of the sequence. *) (* Harvey P. Dale, May 24 2024 *)
  • Python
    from _future_ import division
    from sympy import isprime
    A225864_list = []
    for l in range(1,20):
        plist, q = [p for p in [2,3,5,7] if isprime(l-1+p)], (10**l-1)//9
        for i in range(l):
            for p in plist:
                r = q+(p-1)*10**i
                if not isprime(r):
                    A225864_list.append(r) # Chai Wah Wu, Aug 15 2017

Extensions

Extended by T. D. Noe, May 18 2013
Showing 1-5 of 5 results.