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

A173029 Partial sums of naughty primes A164968.

Original entry on oeis.org

10007, 20016, 60025, 130026, 200029, 270038, 360039, 450046, 550049, 750052, 950061, 1250068, 1650077, 2150086, 2850087, 3750088, 4650095, 5650098, 6650131, 7650168, 8650207, 9650288, 10650387, 11650690, 12651093, 13651502, 14652009, 15652618, 16653525
Offset: 1

Views

Author

Jonathan Vos Post, Feb 07 2010

Keywords

Comments

The subsequence of prime partial sums of naughty primes begins: 10007, 200029, 550049, 6650131. The subsubsequence of naughty prime partial sums of naughty primes begins: 10007, and then what? The smallest square in the sequence is 60025 = 5^2 * 7^4.

Examples

			a(24) = 10007 + 10009 + 40009 + 70001 + 70003 + 70009 + 90001 + 90007 + 100003 + 200003 + 200009 + 300007 + 400009 + 500009 + 700001 + 900001 + 900007 + 1000003 + 1000033 + 1000037 + 1000039 + 1000081 + 1000099 + 1000303.
		

Crossrefs

Programs

  • Mathematica
    Accumulate[Select[Prime[Range[100000]],DigitCount[#,10,0]> IntegerLength[ #]/2&]] (* Harvey P. Dale, Jun 09 2015 *)

Formula

a(n) = SUM[i=1..n] {p such that p is prime and the number of zeros in the decimal representation of p is greater than the number of all other digits}.

Extensions

Corrected and extended by Harvey P. Dale, Jun 09 2015

A069675 Primes all of whose internal digits (if any) are 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, 101, 103, 107, 109, 307, 401, 409, 503, 509, 601, 607, 701, 709, 809, 907, 1009, 2003, 3001, 4001, 4003, 4007, 5003, 5009, 6007, 7001, 8009, 9001, 9007, 10007, 10009
Offset: 1

Views

Author

Amarnath Murthy, Apr 06 2002

Keywords

Comments

Despite their initial density, these primes are rare. The value of a(310) = 9*10^2914 + 7. Beginning with a(54), this is a subsequence of A164968. Indeed, these could be called the "naughtiest" primes. - Harlan J. Brothers, Aug 17 2015
There are expected to be infinitely many terms, but growing very rapidly, something like a(n) ~ exp(exp(const * n)). - Robert Israel, Aug 17 2015

Examples

			4001 is in the sequence because it is prime and all the internal digits (the digits between 4 and 1) are zero. - _Michael B. Porter_, Aug 11 2016
		

Crossrefs

Programs

  • Maple
    A := {}:
    for n to 1000 do
      p := ithprime(n):
      d := convert(p, base, 10):
      s := 0:
      for m from 2 to nops(d)-1 do
        s := s+d[m]:
      end do
      if s = 0 then
        A := `union`(A, {p})
      end if:
    end do:
    A := A
    # César Eliud Lozada, Sep 04 2012
    select(isprime, [$1..9, seq(seq(seq(10^d*a+b, b=1..9),a=1..9), d=1..10)]); # Robert Israel, Aug 18 2015
  • Mathematica
    Select[Prime[Range[1, 100000]], IntegerLength[#] < 3 || Union@Rest@Most@IntegerDigits[#, 10] == {0} &] (* Harlan J. Brothers, Aug 17 2015 *)
    Select[Join[Range[1, 99], Flatten[Table[a*10^d + b, {d, 2, 50}, {a, 1, 9}, {b, 1, 9}]]], PrimeQ[#] &] (* Seth A. Troisi, Aug 03 2016 *)
  • PARI
    go(n)=my(v=List(primes(4)),t); for(d=1,n-1, for(i=1,9, forstep(j=1,9,[2,4,2], if(isprime(t=10^d*i+j), listput(v,t))))); Vec(v) \\ Charles R Greathouse IV, Sep 14 2015
    
  • Python
    from sympy import isprime
    print([2, 3, 5, 7] + list(filter(isprime, (a*10**d+b for d in range(1, 101) for a in range(1, 10) for b in [1, 3, 7, 9])))) # Michael S. Branicky, May 08 2021

Formula

a(n) >> 10^(n/24). - Charles R Greathouse IV, Sep 14 2015

Extensions

Offset corrected and name changed by Arkadiusz Wesolowski, Sep 07 2011

A056709 Naught-y primes, primes with noughts (or zeros).

Original entry on oeis.org

101, 103, 107, 109, 307, 401, 409, 503, 509, 601, 607, 701, 709, 809, 907, 1009, 1013, 1019, 1021, 1031, 1033, 1039, 1049, 1051, 1061, 1063, 1069, 1087, 1091, 1093, 1097, 1103, 1109, 1201, 1301, 1303, 1307, 1409, 1601, 1607, 1609, 1709, 1801, 1901, 1907
Offset: 1

Views

Author

Robert G. Wilson v, Aug 10 2000

Keywords

Comments

Intersection of A000040 and A011540. - Michel Marcus, Mar 12 2015

Crossrefs

Cf. A000040 (primes), A011540 (numbers that contain a 0).
Complement, in A000040, of zeroless primes A038618.
Cf. A164968 (Naughty primes: most digits are 0).

Programs

  • Magma
    [p:p in PrimesUpTo(2000)|0 in Intseq(p)]; // Marius A. Burtea, Jan 13 2020
    
  • Mathematica
    Select[ Range[ 1, 2500, 2 ], PrimeQ[ # ] && Sort[ RealDigits[ # ][ [ 1 ] ] ][ [ 1 ] ] == 0 & ]
    (* Second program: *)
    Select[Prime@ Range@ 300, DigitCount[#, 10, 0] > 0 &] (* Michael De Vlieger, Jan 28 2020 *)
  • PARI
    is(n)=isprime(n)&&vecsort(eval(Vec(Str(n))),,8)[1]==0
    
  • PARI
    select( {is_A056709(n)=!vecmin(digits(n))&&isprime(n)}, [1..2000]) \\ Defines the characteristic function is_A; as check & example: select terms in [1..2000].
    next_A056709(n)={until(!vecmin(digits(n)), n=nextprime(n+1));n} \\ Successor function: find smallest a(k) > n. Useful to get a vector of consecutive terms:
    A056709_vec(n,M=99)=M--;vector(n,i,M=next_A056709(M)) \\ get n terms >= M (if given, else start with a(1)).  \\ M. F. Hasler, Jan 12 2020
    
  • Python
    from sympy import primerange
    def aupto(lim): return [p for p in primerange(1, lim+1) if '0' in str(p)]
    print(aupto(1910)) # Michael S. Branicky, Mar 11 2022

Formula

a(n) ~ n log n: almost all primes are in this sequence. - Charles R Greathouse IV, Jul 24 2012

A186086 Beastly primes (version 1): either 666 followed by 0's and a 1 or 7 at the right end or a palindrome with 666 in the center, 0's surrounding these digits, and 1 or 7 at both ends.

Original entry on oeis.org

6661, 16661, 66601, 76667, 700666007, 6660000000001, 666000000000001, 700000666000007, 70000006660000007, 6660000000000000000000000007, 66600000000000000000000000007, 1000000000000066600000000000001
Offset: 1

Views

Author

Arkadiusz Wesolowski, Feb 12 2011

Keywords

Comments

Differs from A131645 in that 26669, 46663, 56663, 66617, 66629, 66643, 66653, 66683, 66697, 96661, 96667, 106661, 106663, 106669, 116663, 146669, 166601, 166603, 166609, 166613, 166619, 166627, 166631, 166643, 166657, 166667, 166669, 166679, are not included here.
76667 is the largest beastly prime that does not contain the digit "0".

Crossrefs

Programs

  • Mathematica
    e = 14; p = 666*10^n + 1; q = (10^(n + 2) + 666)*10^n + 1; Select[Union[Table[p, {n, 2*e}], Table[p + 6, {n, 2*e}], Table[q, {n, e}], Table[q + 6*10^(2*n + 2) + 6, {n, e}]], PrimeQ] (* Arkadiusz Wesolowski, Sep 21 2011 *)
    Module[{nn=35,bp1,bp2,bp3,bp4}, bp1=FromDigits/@ Table[Join[PadRight[ {6,6,6},n1,0],{1}],{n1,3,nn}]; bp2=FromDigits/@ Table[Join[ PadRight[ {6,6,6},n2,0],{7}], {n2,3,nn}]; bp3=FromDigits/@ Table[Join[PadRight[ {1},n3,0], {6,6,6},PadLeft[ {1},n3,0]],{n3,1,nn/2}];bp4=FromDigits/@ Table[Join[PadRight[{7},n3,0],{6,6,6}, PadLeft[ {7},n3,0]],{n3,1,nn/2}]; Select[Sort[Join[bp1,bp2,bp3,bp4]],PrimeQ]] (* Harvey P. Dale, Jan 18 2017 *)

Extensions

Edited by N. J. A. Sloane, Feb 12 2011
a(10)-a(12) from Charles R Greathouse IV, Feb 12 2011

A182051 Primes with a majority of one digit.

Original entry on oeis.org

2, 3, 5, 7, 11, 101, 113, 131, 151, 181, 191, 199, 211, 223, 227, 229, 233, 277, 311, 313, 331, 337, 353, 373, 383, 433, 443, 449, 499, 557, 577, 599, 661, 677, 727, 733, 757, 773, 787, 797, 811, 877, 881, 883, 887, 911, 919, 929, 977, 991, 997, 1117, 1151
Offset: 1

Views

Author

Arkadiusz Wesolowski, Apr 08 2012

Keywords

Comments

a(n+5) = A164937(n) for n <= 89.

Examples

			1151 is prime and the number of ones is greater than the number of all other digits, so this number is in the sequence.
		

Crossrefs

Supersequence of A164937 and of A164968.

Programs

  • Mathematica
    lst = {}; Do[i = IntegerDigits[n]; If[PrimeQ[n] && Count[i, First[Commonest@i]] > IntegerLength[n]/2, AppendTo[lst, n]], {n, 10^4}]; lst

A386247 Primes containing 000 as a substring.

Original entry on oeis.org

10007, 10009, 40009, 70001, 70003, 70009, 90001, 90007, 100003, 100019, 100043, 100049, 100057, 100069, 130003, 140009, 150001, 160001, 160009, 170003, 180001, 180007, 200003, 200009, 200017, 200023, 200029, 200033, 200041, 200063, 200087, 220009, 230003, 240007
Offset: 1

Views

Author

Alois P. Heinz, Jul 16 2025

Keywords

Comments

Differs from A164968 first at n=10: a(10) = 100019 < 200003 = A164968(10).

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[1230, 25000]], StringContainsQ[IntegerString[#], "000"] &] (* Paolo Xausa, Jul 19 2025 *)

A176781 Smallest prime prime(i) such that concatenation 2//0_(n)//prime(i) is prime.

Original entry on oeis.org

3, 11, 3, 17, 3, 3, 3, 11, 89, 41, 257, 3, 29, 131, 353, 3, 3, 11, 89, 521, 257, 3, 17, 3, 467, 89, 149, 17, 71, 47, 293, 17, 191, 47, 3, 41, 23, 11, 401, 41, 443, 41, 293, 479, 311, 23, 587, 41, 1289, 1013, 29, 41, 59, 293, 1031, 17, 23, 17, 347, 401, 599, 11, 227, 827, 401
Offset: 0

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 26 2010

Keywords

Comments

We search for the prime such that the first prime (=2) concatenated with n zeros and concatenated with that prime is again a prime number.
If p = prime(i) is a d(i)-digit prime: q = 2 * 10^(n+d(i)) + p has to be prime.
Necessarily prime(i) is congruent to 2 (mod 3).
It is conjectured that prime(i) = 3 occurs infinitely often: at n= 0, 2, 4, 5, 6, 11, 15, 16, 21, 23, 34, 114, 119,...

Examples

			n = 0: 2//3 = 23 = prime(9), 3 = prime(2) is first term
n = 1: 2//0//11 = 2011 = prime(305), 11 = prime(5) is 2nd term
n = 2: 2//00//3 = 2003 = prime(304), 3 = prime(2) is 3rd term
		

References

  • E. I. Ignatjew, Mathematische Spielereien, Urania Verlag Leipzig/Jena/ Berlin 1982

Crossrefs

Extensions

Offset corrected and sequence extended by R. J. Mathar, Apr 28 2010

A216203 Smallest prime that does not divide at least one n-digit zeroless pandigital number.

Original entry on oeis.org

44449, 900001, 7000003, 20000003, 30000001, 100000007, 500000003, 1000000007, 6000000001
Offset: 9

Views

Author

Arkadiusz Wesolowski, Mar 12 2013

Keywords

Comments

How many first terms are in A182051?
The analogous sequence for pandigital numbers is A228253. - Giovanni Resta, Aug 19 2013

Crossrefs

Programs

  • Mathematica
    lst = Times @@ Union[FromDigits@# & /@ Permutations@Range[9]]; n = 1; While[True, p = Prime[n]; If[! Divisible[lst, p], Print[p]; Break[]]; n++]

Extensions

a(11)-a(16) from Giovanni Resta, Mar 12 2013
a(17) from Giovanni Resta, Mar 13 2013

A176833 Smallest prime p = prime(i) such that concatenation q(i) = 13//0_(k)//prime(i) (k = 0, 1, 2, ...) is prime.

Original entry on oeis.org

7, 3, 3, 3, 151, 61, 7, 3, 19, 3, 109, 109, 19, 19, 37, 409, 109, 97, 61, 19, 73, 109, 139, 139, 619, 31, 127, 31, 193, 3, 43, 19, 337, 7, 73, 367, 109, 373, 139, 139
Offset: 1

Views

Author

Eva-Maria Zschorn (e-m.zschorn(AT)zaschendorf.km3.de), Apr 27 2010

Keywords

Comments

See comments in A176781
Necessarily p = 3 or p of form 3 * n + 1
In recreational mathematics some authors call a prime that is composed of mostly naughts, i.e. zeros, a naughty prime

Examples

			q(0) = 13//7 = 137 = prime(33), 7 = prime(4) is 1st term
q(1) = 13//0//3 = 1303 = prime(213), 3 = prime(2) is 2nd term
q(26) = 13000000000000000000000000031 is a palindromic prime
		

Crossrefs

Showing 1-9 of 9 results.