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 19 results. Next

A256186 Naught-y primes (A056709) that after removing all zeros become zeroless primes (A038618).

Original entry on oeis.org

101, 103, 107, 109, 307, 401, 503, 509, 601, 607, 701, 709, 809, 907, 1009, 1013, 1031, 1039, 1049, 1051, 1063, 1091, 1093, 1097, 1103, 1301, 1307, 1409, 1607, 1709, 1801, 1901, 1907, 2003, 2011, 2027, 2029, 2039, 2063, 2069, 2081, 2083, 2203, 2207, 2309, 2609, 2707
Offset: 1

Views

Author

Zak Seidov, Mar 19 2015

Keywords

Comments

Subsequence of A256227.

Examples

			a(1)=101=A056709(1) => 11=A038618(5), a(15)=1009=A056709(16) => 19=A038618(8).
		

Crossrefs

Cf. A056709 Naught-y primes, primes with noughts (or zeros), A038618 Primes not containing digit '0', a.k.a. zeroless primes.

Programs

  • Mathematica
    ss = {}; Do[id = IntegerDigits[p = Prime[k]]; If[Min[id] < 1 && PrimeQ[FromDigits[Delete[id, Position[id, 0]]]], ss = {ss, p}], {k, 1, 500}]; Flatten[ss] (* Zak Seidov *)
    Select[Prime[Range[500]], DigitCount[#, 10, 0] > 0 && PrimeQ[FromDigits[DeleteCases[IntegerDigits[#], 0]]] &] (* Alonso del Arte, Mar 22 2015 *)
  • PARI
    is(n)=my(d=digits(n)); isprime(n) && #d>#(d=select(x->x,d)) && isprime(fromdigits(d)) \\ Charles R Greathouse IV, Mar 19 2015

A373294 a(n) is the number of n-digit primes that have at least one zero among their digits (A056709).

Original entry on oeis.org

0, 0, 15, 204, 2251, 23715, 240528, 2391394, 23540109, 230318080, 2244729936, 21819401038, 211711461260, 2051836712085
Offset: 1

Views

Author

Gonzalo Martínez, May 30 2024

Keywords

Examples

			For n = 3, the 3-digit prime numbers that have the digit 0 are 101, 103, 107, 109, 307, 401, 409, 503, 509, 601, 607, 701, 709, 809 and 907. Therefore, a(3) = 15.
		

Crossrefs

First differences of A091644.

Programs

  • PARI
    a(n) = my(s=0); forprime(p=10^(n-1), 10^n-1, if (vecmin(digits(p)) == 0, s++)); s; \\ Michel Marcus, May 31 2024

Formula

a(n) = A091644(n) - A091644(n-1) for n > 1. - Michael S. Branicky, May 31 2024

Extensions

More terms (using A091644) from Michael S. Branicky, May 30 2024

A038618 Primes not containing the digit '0'.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jul 15 1998

Keywords

Comments

Complement of A056709 with respect to primes (A000040). - Lekraj Beedassy, Jul 04 2010
Maynard proves that this sequence is infinite and in particular contains the expected number of elements up to x, on the order of x^(log 9/log 10)/log x. - Charles R Greathouse IV, Apr 08 2016

Crossrefs

Subsequence of A000040 (primes), A052382 (zeroless numbers) and A195943.
Primes having no digit d = 0..9 are this sequence, A038603, A038604, A038611, A038612, A038613, A038614, A038615, A038616, and A038617, respectively.

Programs

  • Haskell
    a038618 n = a038618_list !! (n-1)
    a038618_list = filter ((== 1) . a168046) a000040_list
    -- Reinhard Zumkeller, Apr 07 2014, Sep 27 2011
    
  • Magma
    [ p: p in PrimesUpTo(300) | not 0 in Intseq(p) ];  // Bruno Berselli, Aug 08 2011
    
  • Mathematica
    Select[Prime[Range[70]], DigitCount[#, 10, 0] == 0 &] (* Vincenzo Librandi, Aug 09 2011 *)
  • PARI
    is(n)=if(isprime(n),n=vecsort(eval(Vec(Str(n))),,8);n[1]>0) \\ Charles R Greathouse IV, Aug 09 2011
    
  • PARI
    lista(nn) = forprime (p=2, nn, if (vecmin(digits(p)), print1(p, ", "))); \\ Michel Marcus, Apr 06 2016
    
  • PARI
    next_A038618(n)=until(vecmin(digits(n=nextprime(next_A052382(n)))),);n \\ Cf. OEIS Wiki page (LINKS) for other programs. - M. F. Hasler, Jan 12 2020
    
  • Python
    from sympy import primerange
    def aupto(N): return [p for p in primerange(1, N+1) if '0' not in str(p)]
    print(aupto(300)) # Michael S. Branicky, Mar 11 2022

Formula

Intersection of A052382 (zeroless numbers) and A000040 (primes); A168046(a(n))*A010051(a(n)) = 1. - Reinhard Zumkeller, Dec 01 2009
a(n) ≍ n^(log 10/log 9) log n. - Charles R Greathouse IV, Aug 03 2023

A134809 Cyclops primes.

Original entry on oeis.org

101, 103, 107, 109, 307, 401, 409, 503, 509, 601, 607, 701, 709, 809, 907, 11027, 11047, 11057, 11059, 11069, 11071, 11083, 11087, 11093, 12011, 12037, 12041, 12043, 12049, 12071, 12073, 12097, 13033, 13037, 13043, 13049, 13063
Offset: 1

Views

Author

Omar E. Pol, Nov 25 2007

Keywords

Comments

Cyclops numbers that are prime numbers: primes with an odd number of digits with middle digit 0 that have only one digit 0.
The only known Fibonacci number in this sequence is 99194853094755497 (see A005478 and A182809).
The only known Lucas number in this sequence is 688846502588399 (see A005479 and A182811).

Crossrefs

Intersection of prime numbers A000040 and cyclops numbers A134808.

Programs

  • Mathematica
    (* First run the program given for A134808 *) Select[Prime[Range[2000]], cyclopsQ] (* Alonso del Arte, Dec 16 2010 *)
    cycQ[n_]:=Module[{idn=IntegerDigits[n],len},len=Length[idn];OddQ[len] && Count[idn,0] == 1 && idn[[(len+1)/2]]==0]; Select[Flatten[Table[Prime[ Range[ PrimePi[10^(2n)+1],PrimePi[10^(2n+1)]]],{n,2}]],cycQ] (* Harvey P. Dale, Jun 20 2014 *)
  • Python
    # cyclops() in A134808
    from sympy import isprime
    print([c for c in cyclops(upto=13063) if isprime(c)]) # Michael S. Branicky, Jan 05 2021

Extensions

Links added by Omar E. Pol, Mar 25 2011

A157677 Primes p such that p + (product of digits of p) is also prime.

Original entry on oeis.org

23, 29, 61, 67, 83, 101, 103, 107, 109, 163, 233, 239, 283, 293, 307, 347, 349, 401, 409, 431, 439, 443, 449, 499, 503, 509, 563, 569, 601, 607, 613, 617, 619, 653, 659, 677, 683, 701, 709, 743, 809, 907, 929, 941, 1009, 1013, 1019, 1021, 1031, 1033, 1039
Offset: 1

Views

Author

Kyle D. Balliet, Mar 04 2009

Keywords

Comments

If p contains a zero, then p is trivially a member.

Examples

			83 is prime, and 83 + 8*3 = 89 which is also prime. 103 is prime, and 103 + 1*0*3 = 103 is also prime. Thus 89 and 103 are members.
		

Crossrefs

Union of A092518 and A056709.
Cf. A225303.

Programs

  • Maple
    a := proc (n) local nn: nn := convert(ithprime(n), base, 10): if isprime(ithprime(n)+product(nn[j], j = 1 .. nops(nn))) = true then ithprime(n) else end if end proc: seq(a(n), n = 1 .. 180); # Emeric Deutsch, Mar 08 2009
  • Mathematica
    Select[Prime[Range[175]], PrimeQ[# + Times @@ IntegerDigits[#]] &] (* Jayanta Basu, Apr 22 2013 *)
  • PARI
    dprod(n)=n=digits(n); prod(i=1,#n,n[i])
    is(n)=isprime(n) && isprime(n+dprod(n)) \\ Charles R Greathouse IV, Dec 27 2013

Formula

a(n) ~ n log n. - Charles R Greathouse IV, Apr 22 2013

Extensions

More terms from Emeric Deutsch, Mar 08 2009

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

A227217 Primes p such that p + (product of digits of p) is prime and p - (product of digits of p) is prime.

Original entry on oeis.org

23, 29, 83, 101, 103, 107, 109, 293, 307, 347, 349, 401, 409, 431, 439, 503, 509, 601, 607, 653, 659, 677, 701, 709, 743, 809, 907, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1123, 1201, 1297, 1301, 1303, 1307, 1409, 1423, 1489, 1523
Offset: 1

Views

Author

Derek Orr, Sep 19 2013

Keywords

Comments

Intersection of A157677 and A225319.
Contains A056709. - Robert Israel, Apr 13 2015

Examples

			431 is prime, 431 + (4*3*1) = 443 is prime, and 431 - (4*3*1) = 419 is prime. So, 431 is a term in the sequence.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local m;
      if not isprime(n) then return false fi;
      m:= convert(convert(n,base,10),`*`);
      if m = 0 then return true fi;
      isprime(n+m) and isprime(n-m)
    end proc:
    select(filter, [seq(2*i+1,i=5..10000)]); # Robert Israel, Apr 13 2015
  • Mathematica
    fQ[n_] := Block[{d = IntegerDigits@ n}, PrimeQ[n + Times @@ d] && PrimeQ[n - Times @@ d]]; Select[Prime@ Range@ 250, fQ] (* Michael De Vlieger, Apr 12 2015 *)
  • PARI
    forprime(p=1,2000,d=digits(p);P=prod(i=1,#d,d[i]);if(isprime(p+P)&&isprime(p-P),print1(p,", "))) \\ Derek Orr, Apr 10 2015
  • Python
    from sympy import isprime, primerange
    def DP(n):
        p = 1
        for i in str(n):
            p *= int(i)
        return p
    for pn in primerange(1, 2000):
        dpn = DP(pn)
        if isprime(pn-dpn) and isprime(pn+dpn):
            print(pn, end=', ')
    # Simplified by Derek Orr, Apr 10 2015
    
  • Sage
    [p for p in primes_first_n(1000) if ((p-prod(Integer(p).digits(base=10))) in Primes() and (p+prod(Integer(p).digits(base=10))) in Primes())] # Tom Edgar, Sep 19 2013
    

Extensions

More terms from Derek Orr, Apr 10 2015

A284290 Primes containing a digit 4.

Original entry on oeis.org

41, 43, 47, 149, 241, 347, 349, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 541, 547, 641, 643, 647, 743, 941, 947, 1049, 1249, 1409, 1423, 1427, 1429, 1433, 1439, 1447, 1451, 1453, 1459, 1471, 1481, 1483, 1487, 1489
Offset: 1

Views

Author

Jaroslav Krizek, Mar 24 2017

Keywords

Comments

Subsequence of A011534 and A062669.

Crossrefs

Cf. Primes containing a digit k for k = 0 - 9: A056709 (k = 0), A208270 (k = 1), A208272 (k = 2), A212525 (k = 3), A284290 (k = 4), A257667 (k = 5), A284291 (k = 6), A257668 (k = 7), A284292 (k = 8), A106093 (k = 9).

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | 4 in Intseq(p)]
  • Mathematica
    Select[Range[1500], PrimeQ[#] && MemberQ[IntegerDigits[#], 4] &] (* Amiram Eldar, Nov 09 2019 *)

A284291 Primes containing a digit 6.

Original entry on oeis.org

61, 67, 163, 167, 263, 269, 367, 461, 463, 467, 563, 569, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 761, 769, 863, 967, 1061, 1063, 1069, 1163, 1361, 1367, 1567, 1601, 1607, 1609, 1613, 1619, 1621, 1627, 1637, 1657, 1663
Offset: 1

Views

Author

Jaroslav Krizek, Mar 24 2017

Keywords

Comments

Subsequence of A011536 and A062673.

Crossrefs

Primes containing a digit k for k = 0 - 9: A056709 (k = 0), A208270 (k = 1), A208272 (k = 2), A212525 (k = 3), A284290 (k = 4), A257667 (k = 5), A284291 (k = 6), A257668 (k = 7), A284292 (k = 8), A106093 (k = 9).

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | 6 in Intseq(p)];
  • Mathematica
    Select[Range[2000], PrimeQ[#] && MemberQ[IntegerDigits[#], 6] &] (* Amiram Eldar, Nov 09 2019 *)

A284292 Primes containing a digit 8.

Original entry on oeis.org

83, 89, 181, 281, 283, 383, 389, 487, 587, 683, 787, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 983, 1087, 1181, 1187, 1283, 1289, 1381, 1481, 1483, 1487, 1489, 1583, 1783, 1787, 1789, 1801, 1811, 1823, 1831, 1847, 1861, 1867
Offset: 1

Views

Author

Jaroslav Krizek, Mar 25 2017

Keywords

Comments

Subsequence of A011538 and A062677.
Differs from A062677 which contains also the composites 6889 = 83^2, 7387 = 83*89, 23489=83*283, 25187=89*283, 31789 = 83*383 etc. - R. J. Mathar, Mar 27 2017

Crossrefs

Cf. Primes containing a digit k for k = 0 - 9: A056709 (k = 0), A208270 (k = 1), A208272 (k = 2), A212525 (k = 3), A284290 (k = 4), A257667 (k = 5), A284291 (k = 6), A257668 (k = 7), this sequence (k = 8), A106093 (k = 9).

Programs

  • Magma
    [p: p in PrimesUpTo(10000) | 8 in Intseq(p)];
    
  • Maple
    isA284292 := proc(n)
        if isprime(n) then
            convert(convert(n,base,10),set) ;
            if 8 in % then
                true;
            else
                false;
            end if;
        else
            false;
        end if;
    end proc:
    for n from 1 to 2000 do
        if isA284292(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Mar 27 2017
  • Mathematica
    Select[Prime@ Range@ 500, MemberQ[ IntegerDigits@ #, 8] &] (* Giovanni Resta, Mar 25 2017 *)
  • Python
    from sympy import primerange
    print([n for n in primerange(2, 2000) if '8' in str(n)]) # Indranil Ghosh, Mar 25 2017
Showing 1-10 of 19 results. Next