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

A370850 Lesser of two consecutive primes whose digits' products are also prime.

Original entry on oeis.org

2, 3, 5, 13, 11113, 111111113, 11111111111111111111111111117
Offset: 1

Views

Author

Claude H. R. Dequatre, Mar 03 2024

Keywords

Comments

If it exists, a(8) > 10^500. - Hugo Pfoertner, Mar 03 2024
If it exists, a(8) > 10^10000. - Bert Dobbelaere, Mar 16 2024

Examples

			13 is a term because 13 is prime, the product of its digits is 3 which is prime and the product of the digits of 17, the next prime to 13, is 7 and 7 is prime.
19 is not a term because the product of its digits is 9 and 9 is not prime.
131 is not a term because although it is prime and the product of its digits is 3 which is also prime, the product of the digits of 137, the next prime to 131, is 21 and 21 is not prime.
		

Crossrefs

Cf. also A370848, A370851.

Programs

  • Mathematica
    Select[Prime[Range[10^5]], PrimeQ[Apply[Times, IntegerDigits[#]]]&&PrimeQ[Apply[Times, IntegerDigits[NextPrime[#]]]]&] (* James C. McMahon, Mar 03 2024 *)
  • PARI
    isok(p)=my(x=vecprod(digits(p)),y=vecprod(digits(nextprime(p+1))));isprime(x) && isprime(y);
    forprime(p=2,20000,if(isok(p),print1(p", ")))
    
  • PARI
    a370850(maxdigits=100) = {my(L=List()); for (n=1, maxdigits, my (r=(10^n-1)/9, d=digits(r)); foreach ([2,3,5,7], s, for (k=1, #d, my(dd=d); dd[k]=s; my (q=fromdigits(dd)); if (ispseudoprime(q) && isprime(vecprod(digits(nextprime(q+1)))), listput(L,q))))); vecsort(Vec(L))};
    a370850() \\ Hugo Pfoertner, Mar 03 2024

Extensions

a(7) from Hugo Pfoertner, Mar 03 2024

A107611 Indices of primes with digit product = 2.

Original entry on oeis.org

1, 47, 318, 10546, 10552, 10629, 86544, 56196114, 56200915, 56676030, 4555804158, 4559732893, 77220966866, 2907021742443997, 2907021767925176, 2907024290266584, 2932496986613869, 51280189662853652, 2461813897281353935, 23422580231698333926, 23422580438055032295
Offset: 1

Views

Author

Zak Seidov, May 17 2005

Keywords

Comments

Next term is A000720(111111111111112111) > A000720(10^17) > 2*10^15.

Crossrefs

Corresponding primes in A107612.

Programs

  • Mathematica
    Do[If[Apply[Times, IntegerDigits[Prime[n]]]==2, Print[n]], {n, 100000}]

Formula

a(n) = A000720(A107612(n)). - David Wasserman, May 07 2008

Extensions

More terms from Ryan Propper, Jan 03 2008
a(14)-a(21) calculated using Kim Walisch's primecount and added by Amiram Eldar, Sep 03 2024

A184328 Primes whose digital product is a positive square.

Original entry on oeis.org

11, 19, 41, 149, 191, 199, 229, 263, 281, 313, 331, 419, 433, 449, 491, 499, 661, 683, 797, 821, 829, 863, 881, 911, 919, 941, 977, 991, 1229, 1289, 1433, 1499, 1559, 1669, 1747, 1889, 1933, 1949, 1999, 2129, 2383, 2693, 2819, 2833, 2963, 3319, 3391, 3413
Offset: 1

Views

Author

Dario Piazzalunga, Dec 24 2012

Keywords

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(4000) | not IsZero(t) and IsSquare(t) where t is &*Intseq(p)]; // Bruno Berselli, Dec 25 2012
  • Mathematica
    fQ[n_] := Module[{d = Times @@ IntegerDigits[n]}, d > 0 && IntegerQ[Sqrt[d]]];Select[Prime[Range[1000]], fQ] (* T. D. Noe, Dec 24 2012 *)

Extensions

Corrected and extended by T. D. Noe, Dec 24 2012

A230228 a(n) is the smallest palindromic prime that is the first of n consecutive palindromic primes whose product of digits is equal and nonzero.

Original entry on oeis.org

2, 191, 1123529253211, 3868168229228618683, 164471141292141174461
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 12 2013

Keywords

Comments

a(6) > 10^22.

Examples

			a(2) = 191, since 191 and 313 are two consecutive palindromic primes with product of digits as 9 and this is the first occurrence of two consecutive palindromic primes whose product of digits is equal and nonzero.
		

Crossrefs

A344466 Primes that occur as p + (digit product of p) for p in A092518.

Original entry on oeis.org

29, 47, 67, 107, 109, 181, 251, 293, 331, 347, 431, 443, 457, 491, 547, 593, 631, 653, 659, 673, 743, 823, 827, 839, 929, 971, 977, 1091, 1129, 1181, 1231, 1237, 1279, 1321, 1327, 1423, 1433, 1447, 1471, 1483, 1493, 1499, 1553, 1559, 1579, 1601, 1777, 1823, 1867, 1871, 1951, 1993, 2113, 2137
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, May 20 2021

Keywords

Comments

Terms are unique and in numerical order.
There are terms that correspond to more than one member of A092518, such as 827 = 683+6*8*3 = 743+7*4*3.

Examples

			a(4) = 107 is a term because 83 = A092518(5) and 107 = 83+8*3.
		

Crossrefs

Programs

  • Maple
    N:= 10000: # to get terms <= N
    S:= {}:
    p:= 1:
    do
      p:= nextprime(p);
      if p >= N then break fi;
      L:= convert(p,base,10);
      if member(0,L) then next fi;
      q:= p + convert(L,`*`);
      if q <= N and isprime(q) then
         S:= S union {q};
      fi
    od:
    sort(convert(S,list));

A370851 Lesser of two consecutive primes such that the product of its digits is also prime and that of the other is composite.

Original entry on oeis.org

17, 31, 71, 113, 131, 151, 211, 311, 1117, 1151, 1171, 1511, 2111, 11117, 11131, 11171, 11311, 111121, 111211, 112111, 113111, 131111, 311111, 511111, 1111151, 1111211, 1111711, 1117111, 1171111, 11111117, 11111131, 11111171, 11111311, 11113111, 11131111, 71111111
Offset: 1

Views

Author

Claude H. R. Dequatre, Mar 03 2024

Keywords

Examples

			17 is a term because 17 is prime, the product of its digits is 7 which is prime and the product of the digits of 19, the next prime to 17, is 9 and 9 is composite.
13 is not a term because although it is prime and the product of its digits is 3 which is also prime, the product of the digits of 17, the next prime to 13, is 7 and 7 is not composite.
29 is not a term because the product of its digits is 18 and 18 is not prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[6*10^6]], PrimeQ[Apply[Times, IntegerDigits[#]]]&&CompositeQ[Apply[Times,IntegerDigits[NextPrime[#]]]]&] (* James C. McMahon, Mar 03 2024 *)
  • PARI
    isok(p)=my(x=vecprod(digits(p)),y=vecprod(digits(nextprime(p+1))));isprime(x) && y>3 &&!isprime(y);
    forprime(p=2,20000,if(isok(p),print1(p", ")))
    
  • Python
    from math import prod
    from itertools import count, islice
    from sympy import isprime, nextprime
    def A370851_gen(): # generator of terms
        for l in count(1):
            k = (10**l-1)//9
            for m in range(l):
                a = 10**m
                for j in (1,2,4,6):
                    p = k+a*j
                    if isprime(p) and not (isprime(s:=prod(map(int,str(nextprime(p))))) or s==1):
                        yield p
    A370851_list = list(islice(A370851_gen(),20)) # Chai Wah Wu, Mar 25 2024

A172195 Prime numbers for which the absolute difference between the summation of its digits & the product of its digits is a prime.

Original entry on oeis.org

29, 37, 43, 47, 53, 59, 67, 73, 79, 83, 97, 101, 113, 131, 151, 181, 191, 211, 223, 227, 229, 251, 281, 311, 313, 331, 401, 409, 443, 449, 461, 463, 467, 521, 601, 607, 641, 643, 647, 661, 683, 809, 811, 821, 863, 881, 883, 911, 1013, 1019, 1031
Offset: 1

Views

Author

Umut Uludag, Jan 29 2010

Keywords

Crossrefs

Cf. A007605 (Sum of digits of n-th prime), A053666 (Product of digits of n-th prime). For the sequence terms, abs(A007605(n) - A053666(n)) is prime.

Programs

  • Mathematica
    dpQ[n_]:=Module[{idn=IntegerDigits[n]},PrimeQ[Abs[Total[idn]- Times@@ idn]]]; Select[Prime[Range[400]],dpQ] (* Harvey P. Dale, Feb 20 2014 *)

A213394 The difference between n and the product of the digits of the n-th prime.

Original entry on oeis.org

-1, -1, -2, -3, 4, 3, 0, -1, 3, -8, 8, -9, 9, 2, -13, 1, -28, 12, -23, 13, 0, -41, -1, -48, -38, 26, 27, 28, 29, 27, 17, 29, 12, 7, -1, 31, 2, 20, -3, 19, -22, 34, 34, 17, -18, -35, 45, 36, 21, 14, 33, -2, 45, 44, -15, 20, -51, 44, -39, 44, 13, 8, 63, 61, 56
Offset: 1

Views

Author

Michael Turniansky, Jun 28 2012

Keywords

Comments

The first three zeros occur at terms 7, 21 and 181440.

Programs

  • Mathematica
    Table[n - Times @@ IntegerDigits[Prime[n]], {n, 100}] (* T. D. Noe, Jun 28 2012 *)

Formula

a(n) = A000027(n) - A053666(n).

A227892 Smaller of two consecutive palindromic primes whose product of digits is equal and nonzero.

Original entry on oeis.org

191, 1129211, 3218123, 7129217, 7718177, 125292521, 146181641, 171292171, 197292791, 198292891, 316141613, 325383523, 359292953, 767292767, 773181377, 777494777, 929292929, 946141649, 983181389, 992181299, 11222922211, 11584948511, 11942924911, 11991819911
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 14 2013

Keywords

Examples

			191 is in the sequence because 191 and 313 are consecutive palindromic primes and the product of the digits of each = 9.
		

Crossrefs

Programs

  • Mathematica
    Select[Partition[Select[Prime[Range[542*10^6]],PalindromeQ],2,1],Times @@ IntegerDigits[ #[[1]]] ==Times@@IntegerDigits[#[[2]]]>0&][[All,1]] (* Harvey P. Dale, Dec 23 2022 *)

A227893 Smallest of three consecutive palindromic primes whose product of digits is equal and nonzero.

Original entry on oeis.org

1123529253211, 1261129211621, 9989629269899, 136671292176631, 138354292453831, 141495292594141, 143255292552341, 143445292544341, 144413292314441, 158232292232851, 165882292288561, 176838292838671, 184623292326481, 188291292192881, 322632292236223
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 14 2013

Keywords

Examples

			1123529253211 is in the sequence because 1123529253211,1123534353211 and 1123561653211 are consecutive palindromic primes and the product of the digits of each = 32400.
		

Crossrefs

Previous Showing 11-20 of 27 results. Next