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.

A066725 Primes whose product of digits + 1 is also prime.

Original entry on oeis.org

2, 11, 23, 29, 41, 43, 47, 61, 67, 89, 149, 163, 167, 211, 223, 227, 229, 233, 251, 257, 263, 269, 281, 349, 367, 383, 419, 431, 433, 439, 463, 491, 521, 523, 569, 587, 613, 617, 631, 643, 659, 661, 673, 761, 769, 821, 827, 857, 883, 887, 929, 941, 967, 1123
Offset: 1

Views

Author

Joseph L. Pe, Jan 15 2002

Keywords

Examples

			2 * 2 * 3 + 1 = 13, a prime; since 223 is also prime, it is a term of the sequence.
		

Crossrefs

Primes in A081988.

Programs

  • Mathematica
    Select[Prime[Range[200]],PrimeQ[Times@@IntegerDigits[#]+1]&] (* Harvey P. Dale, May 09 2012 *)
  • PARI
    isok(p)={ isprime(p) && isprime(vecprod(digits(p)) + 1) } \\ Harry J. Smith, Mar 19 2010

Formula

A084354 MINUS A011540. - R. J. Mathar, Aug 26 2007

Extensions

Terms a(35)-a(54) from Harry J. Smith, Mar 19 2010

A084979 Palindromes such that the product of the digits + 1 is prime.

Original entry on oeis.org

1, 2, 4, 6, 11, 22, 44, 66, 111, 121, 141, 161, 212, 232, 242, 272, 292, 323, 343, 383, 414, 464, 474, 545, 565, 616, 626, 636, 656, 747, 838, 848, 878, 898, 929, 969, 1111, 1221, 1441, 1661, 2112, 2222, 2332, 2552, 2772, 2882, 3223, 3883, 4114, 4444, 4554
Offset: 1

Views

Author

Meenakshi Srikanth (menakan_s(AT)yahoo.com), Jun 21 2003

Keywords

Examples

			383 is a term since 3*8*3 = 72, 72+1 = 73 is prime.
		

Crossrefs

Cf. A081988.

Programs

  • Mathematica
    Select[ Range[4663], FromDigits[ Reverse[ IntegerDigits[ # ]]] == # && PrimeQ[1 + Times @@ IntegerDigits[ # ]] & ]
    Parallelize[While[True,If[PalindromeQ[n]&&PrimeQ[1+Product[Part[IntegerDigits[n],k],{k,1,Length[IntegerDigits[n]]}]],Print[n]];n++];n] (* J.W.L. (Jan) Eerland, Dec 27 2021 *)
  • Python
    from math import prod
    from sympy import isprime
    from itertools import count, islice, product
    def cond(n): return isprime(prod(map(int, str(n))) + 1)
    def pals(): # generator of palindromes as strings
        digits = "0123456789"
        for d in count(1):
            for p in product(digits, repeat=d//2):
                if d > 1 and p[0] == "0": continue
                left = "".join(p); right = left[::-1]
                for mid in [[""], digits][d%2]:
                    yield int(left + mid + right)
    def agen(): yield from filter(cond, pals())
    print(list(islice(agen(), 51))) # Michael S. Branicky, Aug 22 2022

Formula

a(n) >> n^k, where k = log_3(10) = 2.0959.... - Charles R Greathouse IV, Aug 02 2010

Extensions

Edited, corrected and extended by Robert G. Wilson v, Jun 21 2003
Formula by Charles R Greathouse IV, Aug 02 2010

A244748 Numbers k such that (product of digits of k)^2 + 1 is prime.

Original entry on oeis.org

1, 2, 4, 6, 11, 12, 14, 16, 21, 22, 23, 25, 27, 28, 32, 38, 41, 44, 45, 46, 49, 52, 54, 58, 61, 64, 66, 69, 72, 78, 82, 83, 85, 87, 94, 96, 111, 112, 114, 116, 121, 122, 123, 125, 127, 128, 132, 138, 141, 144, 145, 146, 149, 152, 154, 158, 161, 164, 166, 169, 172, 178, 182, 183
Offset: 1

Views

Author

Derek Orr, Jul 12 2014

Keywords

Comments

A number k is a term of this sequence iff A007954(k)^2 is in A006093.
This sequence is infinite. With any number a(n), you can add infinitely many 1's to its decimal representation. E.g., 85 is in this sequence, so 185, 815, 851, 1185, 1815, 18115, etc. are terms as well.

Examples

			(7*2)^2 + 1 = 197 is prime. Thus 72 is a term of this sequence.
		

Crossrefs

Programs

  • PARI
    for(n=1,10^3,d=digits(n);if(ispseudoprime(prod(i=1,#d,d[i])^2+1),print1(n,", ")))

Extensions

Corrected by Jens Kruse Andersen, Jul 13 2014

A244607 Numbers k such that (product of digits of k) - 1 is prime.

Original entry on oeis.org

3, 4, 6, 8, 13, 14, 16, 18, 22, 23, 24, 26, 27, 29, 31, 32, 34, 36, 38, 41, 42, 43, 45, 46, 48, 54, 56, 61, 62, 63, 64, 65, 67, 68, 69, 72, 76, 81, 83, 84, 86, 89, 92, 96, 98, 113, 114, 116, 118, 122, 123, 124, 126, 127, 129, 131, 132, 134, 136, 138, 141, 142, 143, 145, 146
Offset: 1

Views

Author

Derek Orr, Jul 01 2014

Keywords

Comments

This sequence is infinite. With any number a(n), you can add infinitely many 1's to its decimal representation. E.g., 32 is in this sequence, so 321, 312, 3211, 32111, 31121, 11321, etc. are also terms of this sequence.
A number k is a term of this sequence iff A007954(k) is in A008864.

Examples

			3*2 - 1 = 5 is prime. Thus 32 is a term of this sequence.
		

Crossrefs

Programs

  • PARI
    for(n=1,10^3,d=digits(n);p=prod(i=1,#d,d[i]);if(isprime(p-1),print1(n,", ")))

Extensions

Wrong term removed by Jens Kruse Andersen, Jul 13 2014

A245017 Numbers k such that (product of digits of k) + 1 and (product of digits of k)^2 + 1 are both prime.

Original entry on oeis.org

1, 2, 4, 6, 11, 12, 14, 16, 21, 22, 23, 25, 28, 32, 41, 44, 49, 52, 58, 61, 66, 82, 85, 94, 111, 112, 114, 116, 121, 122, 123, 125, 128, 132, 141, 144, 149, 152, 158, 161, 166, 182, 185, 194, 211, 212, 213, 215, 218, 221, 224, 229, 231, 236, 242, 245, 251, 254, 263, 279, 281, 292
Offset: 1

Views

Author

Derek Orr, Jul 12 2014

Keywords

Comments

A number k is a term of this sequence iff A007954(k) and A007954(k)^2 are both in A006093.
This sequence is infinite. With any number a(n), you can add infinitely many 1's to its decimal representation. E.g., 82 is in this sequence, so 821, 812, 1182, 18112, 81211, etc. are also terms of this sequence.

Examples

			(9*4) + 1 = 37 is prime and (9*4)^2 + 1 = 1297 is prime. Thus 94 is a term of this sequence.
		

Crossrefs

Programs

  • Mathematica
    bpQ[n_]:=Module[{c=Times@@IntegerDigits[n]},AllTrue[{c+1,c^2+1},PrimeQ]]; Select[Range[300],bpQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Nov 09 2019 *)
  • PARI
    for(n=1, 10^3, d=digits(n); p=prod(i=1, #d, d[i]); if(ispseudoprime(p+1) && ispseudoprime(p^2 + 1), print1(n,", ")))
Showing 1-5 of 5 results.