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

A230041 Primes related to the strictly increasing subsequence of A053666.

Original entry on oeis.org

2, 3, 5, 7, 19, 29, 37, 47, 59, 79, 89, 199, 269, 359, 379, 389, 479, 499, 599, 797, 887, 997, 1889, 1999, 2689, 2699, 2789, 2999, 3889, 3989, 4789, 4799, 4889, 4999, 6899, 8999, 25999, 27799, 28789, 28979, 29989, 37799, 37889, 39799, 39989, 48799, 48889
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 06 2013

Keywords

Comments

a(1)=2; a(n+1) is the smallest prime with product of digits > product of digits of a(n).
From Wolfdieter Lang, Oct 31 2014: (Start)
A053666 is sieved as follows:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, ...
2, 3, 5, 7, 1, 3, 7, 9, 6, 18, 3, 21, 4, 12, 28, ...
2, 3, 5, 7, x, x, x, 9, x, 18, x, 21, x, x, 28,
and the related primes are:
2, 3, 5, 7, 19, 29, 37, 47, ...
(End)
------------------------------------------------------

Examples

			a(6) = 29, product of digits is 18; a(7) = 37, product of digits is 21 and 21 > 18.
		

Crossrefs

Programs

  • Mathematica
    a = {}; t = 0; Do[s = Apply[Times, IntegerDigits[Prime[n]]]; If[s > t, t = s; AppendTo[a, Prime[n]]], {n, 1, 10^4}]; a

Extensions

Edited. Name specified. A000040, A053666 and 'easy' added by Wolfdieter Lang, Oct 31 2014

A069802 Primes related to the nondecreasing subsequence of A053666.

Original entry on oeis.org

2, 3, 5, 7, 17, 19, 29, 37, 47, 59, 79, 89, 199, 269, 349, 359, 379, 389, 479, 499, 599, 797, 887, 997, 1889, 1999, 2689, 2699, 2789, 2879, 2897, 2999, 3889, 3989, 4789, 4799, 4889, 4999, 6899, 8699, 8969, 8999, 25999, 27799, 27997, 28789, 28879
Offset: 1

Views

Author

Amarnath Murthy, Apr 13 2002

Keywords

Examples

			A053666 is sieved in the following way:
1  2  3  4  5  6  7  8  9  10 11  12 13  14  15 16 ...
2  3  5  7  1  3  7  9  6  18  3  21  4  12  28 15 ...
2  3  5  7  x  x  7  9  x  18  x  21  x   x  28  x ...
with the related primes
2  3  5  7       17 19     29     37         47    ...
- _Wolfdieter Lang_, Nov 01 2014
-------------------------------------------------------
		

Crossrefs

Programs

  • Mathematica
    t = 0; Do[s = Apply[ Times, IntegerDigits[ Prime[n]]]; If[s >= t, t = s; Print[ Prime[n]]], {n, 1, 10^4}]

Extensions

Edited and extended by Robert G. Wilson v, Apr 15 2002
Edited, name specified, and cross-reference A053666 and example added by Wolfdieter Lang, Nov 01 2014

A107612 Primes with digital product = 2.

Original entry on oeis.org

2, 211, 2111, 111121, 111211, 112111, 1111211, 1111111121, 1111211111, 1121111111, 111111211111, 111211111111, 2111111111111, 111111111111112111, 111111112111111111, 111111211111111111, 112111111111111111
Offset: 1

Views

Author

Zak Seidov, May 17 2005

Keywords

Comments

Corresponding indices of primes in A107611. Cf. A053666, A101987.

Crossrefs

Programs

  • Maple
    for i from 0 to 30 do it:=sum(10^j, j=0..i): for k from 0 to i do if isprime(it+10^k) then printf(`%d,`, it+10^k) fi: od:od: (Sellers)
  • Mathematica
    Flatten[ Table[ Select[ Sort[ FromDigits /@ Permutations[ Flatten[{2, Table[1, {n}]}]]], PrimeQ[ # ] &], {n, 0, 19}]] (* Robert G. Wilson v, May 19 2005 *)
    Select[Flatten[Table[FromDigits/@Permutations[PadRight[{2},n,1]],{n,20}]],PrimeQ]//Sort (* Harvey P. Dale, May 28 2017 *)

Formula

A107612(n) = prime(A107611(n)).

Extensions

More terms from Robert G. Wilson v and James Sellers, May 19 2005

A092518 Primes p with no zero digits such that (the digit product of p) plus p is also prime.

Original entry on oeis.org

23, 29, 61, 67, 83, 163, 233, 239, 283, 293, 347, 349, 431, 439, 443, 449, 499, 563, 569, 613, 617, 619, 653, 659, 677, 683, 743, 929, 941, 1123, 1163, 1217, 1231, 1237, 1249, 1289, 1297, 1321
Offset: 1

Views

Author

Ray G. Opao, Apr 06 2004

Keywords

Examples

			a(2) = 29: 29+2(9) = 29+18 = 47 which is prime.
		

Crossrefs

Cf. A053666.

Programs

  • Mathematica
    Select[Prime[Range[300]],DigitCount[#,10,0]==0&&PrimeQ[#+Times@@ IntegerDigits[ #]]&] (* Harvey P. Dale, Jan 27 2020 *)
  • PARI
    dprod(n)=n=digits(n); prod(i=1, #n, n[i])
    is(n)=my(d=dprod(n)); d && isprime(n+d) && isprime(n) \\ Charles R Greathouse IV, Dec 27 2013

Extensions

Definition clarified by Harvey P. Dale, Jan 27 2020

A101987 Product of nonzero digits of n-th prime.

Original entry on oeis.org

2, 3, 5, 7, 1, 3, 7, 9, 6, 18, 3, 21, 4, 12, 28, 15, 45, 6, 42, 7, 21, 63, 24, 72, 63, 1, 3, 7, 9, 3, 14, 3, 21, 27, 36, 5, 35, 18, 42, 21, 63, 8, 9, 27, 63, 81, 2, 12, 28, 36, 18, 54, 8, 10, 70, 36, 108, 14, 98, 16, 48, 54, 21, 3, 9, 21, 9, 63, 84, 108, 45, 135, 126, 63, 189, 72, 216
Offset: 1

Views

Author

Zak Seidov, Jan 29 2005

Keywords

Comments

First differs from A053666 in 26th term.

Examples

			a(25) = 63 because the 25th prime is 97 and 9 * 7 = 63.
a(26) = 1 because the 26th prime is 101, but we ignore the 0 and thus have 1 * 1 = 1.
		

Crossrefs

Programs

  • Maple
    a:= n-> mul(`if`(i=0, 1, i), i=convert(ithprime(n), base, 10)):
    seq(a(n), n=1..77);  # Alois P. Heinz, Mar 11 2022
  • Mathematica
    Table[Times@@ReplaceAll[IntegerDigits[Prime[n]], 0 -> 1], {n, 80}] (* Alonso del Arte, Feb 28 2014 *)
  • PARI
    a(n) = vecprod(select(x->(x>1), digits(prime(n)))); \\ Michel Marcus, Mar 11 2022
    
  • Python
    from math import prod
    from sympy import sieve
    def A051801(n): return prod(int(d) for d in str(n) if d != '0')
    def a(n): return A051801(sieve[n])
    print([a(n) for n in range(1, 78)]) # Michael S. Branicky, Mar 11 2022

Formula

a(n) = A051801(prime(n)). - Michel Marcus, Mar 11 2022

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

Original entry on oeis.org

2, 1913, 442619, 336737123, 123381165263, 11865678519229
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 08 2013

Keywords

Examples

			a(3) = 442619, since 442619, 442633 and 442691 are three consecutive primes with product of digits as 1728 and this is the first occurrence of three consecutive primes whose product of digits is equal and nonzero.
		

Crossrefs

Extensions

a(5)-a(6) from Giovanni Resta, Oct 08 2013

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

Original entry on oeis.org

1913, 2819, 6719, 14519, 16319, 18379, 19319, 21419, 29819, 34613, 35617, 35879, 36979, 37379, 37619, 37813, 39119, 45613, 46619, 46919, 49279, 51613, 55313, 56179, 56713, 58613, 62219, 63179, 65479, 66413, 74779, 75913, 76213, 76579, 76679, 79319, 82619
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 08 2013

Keywords

Examples

			1913 is in the sequence because 1913 and 1931 are consecutive primes and the product of the digits of each = 27.
		

Crossrefs

Programs

  • Mathematica
    a = {}; m = 1; s = 1; Do[If[(y = Apply[Times, IntegerDigits[x = Prime[n]]]) == s && s != 0, m = m + 1; If[m > 1, AppendTo[a, Prime[n - 1]]], m = 1]; s = y, {n, 1, 10000}]; a

A230200 Product of digits of n-th palindromic prime.

Original entry on oeis.org

2, 3, 5, 7, 1, 0, 3, 5, 8, 9, 9, 45, 63, 72, 98, 245, 392, 441, 81, 162, 0, 0, 0, 3, 4, 16, 28, 32, 27, 72, 81, 48, 112, 100, 125, 0, 108, 180, 216, 196, 441, 64, 256, 243, 648, 729, 0, 0, 0, 0, 0, 0, 45, 108, 144, 405, 720, 1152, 0, 225, 675, 1575, 648
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 11 2013

Keywords

Examples

			a(6) = 0, since product of digits of 6th palindromic prime, that is, 101 is 0.
		

Crossrefs

Programs

  • Mathematica
    a = {}; Do[z = n*10^(IntegerLength[n] - 1) + FromDigits@Rest@Reverse@IntegerDigits[n]; If[PrimeQ[z], s = Apply[Times, IntegerDigits[z]]; AppendTo[a, s]], {n, 1, 10^5}]; Insert[a, 1, 5]
    Times@@IntegerDigits[#]&/@Select[Prime[Range[5000]],PalindromeQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jun 17 2017 *)

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

Original entry on oeis.org

442619, 2483219, 6325619, 7567919, 7886519, 9883673, 9962219, 11117123, 14669519, 15446819, 17958419, 21337279, 23623129, 26453671, 26872919, 27234419, 27536519, 27948343, 32638213, 32964341, 33539783, 33813419, 34277819, 34554719, 35732381, 37571519
Offset: 1

Views

Author

Shyam Sunder Gupta, Oct 08 2013

Keywords

Examples

			442619 is in the sequence because 442619,442633 and 442691 are consecutive primes and the product of the digits of each = 1728.
		

Crossrefs

Programs

  • Mathematica
    a = {}; m = 1; s = 1; Do[ If[(y = Apply[Times, IntegerDigits[x = Prime[n]]]) == s && s != 0, m = m + 1; If[m > 2, AppendTo[a, Prime[n - 2]]], m = 1]; s = y, {n, 1, 100000}]; a
    Transpose[Select[Partition[Prime[Range[23*10^5]],3,1],Times@@ IntegerDigits[ #[[1]]]==Times@@IntegerDigits[#[[2]]] == Times@@ IntegerDigits[#[[3]]]>0&]][[1]] (* Harvey P. Dale, Apr 05 2016 *)
    pdeQ[{a_,b_,c_}]:=Module[{un=Union[Times@@@IntegerDigits[{a,b,c}]]},un != {0} && Length[un]==1]; Select[Partition[Prime[Range[23*10^5]],3,1],pdeQ][[All,1]] (* Harvey P. Dale, Feb 01 2022 *)

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

Original entry on oeis.org

13, 17, 31, 71, 113, 1151, 11131, 112111, 113111, 131111, 1111211, 1111711, 11111117, 11111171, 71111111, 115111111, 1111111121, 1111115111, 1115111111, 1117111111, 1151111111, 1711111111, 11111111113, 11113111111, 31111111111, 111113111111, 111511111111, 1111171111111
Offset: 1

Views

Author

Claude H. R. Dequatre, Mar 03 2024

Keywords

Examples

			13 is a term because 13 is prime, the product of its digits is 3 which is also prime and the sum of the digits of 17, the next prime to 13, is 8 which is composite.
23 is not a term because the product of its digits is 6 which 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 sum of the digits of 137, the next prime to 131, is 11 which is not composite.
		

Crossrefs

Cf. A370850.
Except for the first, all terms of this sequence are in A370851.

Programs

  • Mathematica
    Select[Prime[Range[5*10^6]],PrimeQ[Apply[Times,IntegerDigits[#]]]&&CompositeQ[Total[IntegerDigits[NextPrime[#]]]]&] (* James C. McMahon, Mar 03 2024 *)
  • PARI
    isok(p)=my(x=vecprod(digits(p)),y=sumdigits(nextprime(p+1)));isprime(x) && !isprime(y);
    forprime(p=2,20000,if(isok(p),print1(p", ")))
    
  • PARI
    a370848(maxdigits=20) = {my (L=List()); for (n=2, 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(sumdigits(nextprime(q+1))), listput(L,q))))); vecsort(Vec(L))};
    a370848() \\ Hugo Pfoertner, Mar 03 2024
    
  • Python
    from itertools import count, islice
    from sympy import isprime, nextprime
    def A370848_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(sum(map(int,str(nextprime(p))))):
                        yield p
    A370848_list = list(islice(A370848_gen(),20)) # Chai Wah Wu, Mar 25 2024

Extensions

a(17)-a(21) from Michel Marcus, Mar 03 2024
a(22)-a(28) from Hugo Pfoertner, Mar 03 2024
Showing 1-10 of 27 results. Next