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 41-50 of 50 results.

A221984 Number of primes of the form (x+1)^11 - x^11 having n digits.

Original entry on oeis.org

1, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 2, 1, 0, 0, 3, 3, 3, 6, 6, 5, 6, 5, 20, 17, 21, 29, 33, 29, 52, 67, 86, 75, 114, 120, 146, 191, 267, 291, 394, 470, 561, 652, 837, 1063, 1339, 1709, 2018, 2475, 3092, 3680, 4750, 5925, 7295, 9063, 11174, 14034, 17294, 21208
Offset: 9

Views

Author

Vladimir Pletser, Feb 02 2013

Keywords

Comments

Number of primes having n digits and equal to the difference of two consecutive eleventh powers (x+1)^11 - x^11 = 11x(x+1)(x^2+x+1)[ x(x+1)(x^2+x+1)(x^2+x+3)+1] +1 (A189055). Values of x = A211184. Sequence of number of primes having n digits and of the form (x+1)^11 - x^11 have similar characteristics to similar sequences for natural primes (A006879), cuban primes (A221792) and primes of the form (x+1)^p - x^p for p = 5 (A221847) and p = 7 (A221978).

Programs

  • Mathematica
    nn = 40; t = Table[0, {nn}]; n = 0; While[n++; p = (n + 1)^11 - n^11; p < 10^nn, If[PrimeQ[p], m = Ceiling[Log[10, p]]; t[[m]]++]]; t (* T. D. Noe, Feb 04 2013 *)

A243767 Decimal prime numbers which can be split into three equal-sized prime parts whose sum is prime. No leading zeros.

Original entry on oeis.org

223, 227, 337, 353, 373, 557, 577, 733, 757, 773, 111119, 111317, 111323, 111337, 111347, 111373, 111731, 111773, 111779, 111913, 111953, 111959, 111973, 111997, 112337, 112397, 112913, 112919, 112967, 112997, 113111, 113117, 113131, 113147, 113159, 113161
Offset: 1

Views

Author

Andreas Boe, Jun 10 2014

Keywords

Comments

It appears that the sequence is infinite.

Examples

			Prime number 112337 -> 11(prime) + 23(prime) + 37(prime) = 71(prime).
		

Crossrefs

Subset of A243766.
Cf. A006879.

Programs

  • Mathematica
    Join[Select[FromDigits/@Select[Tuples[Prime[Range[4]],3],PrimeQ[Total[ #]]&],PrimeQ],Select[ FromDigits[Flatten[IntegerDigits/@#]]&/@Select[ Tuples[ Prime[Range[5,25]],3],PrimeQ[Total[#]]&],PrimeQ]] (* The program generates the first 1283 terms of the sequence, i.e., all terms with six digits or less. *) (* Harvey P. Dale, Dec 04 2022 *)
  • PARI
    first(n) = { my(res = List()); for(i = 1, oo, pow10 = 10^i; pow100 = 100^i; forprime(p = 10^(i-1), 10^i, firstidigs = pow100 * p; forprime(q = 10^(i-1), 10^i, pandq = p+q; first2idigs = firstidigs + pow10*q; forprime(r = 10^(i-1), 10^i, if(isprime(pandq + r), c = first2idigs + r; if(isprime(c), listput(res, c); if(#res >= n, return(res) ) ) ) ) ) ) ) } \\ David A. Corneth, Dec 04 2022
    
  • Python
    from sympy import isprime, primerange
    from itertools import count, islice, product
    def agen(): yield from filter(isprime, (a*10**(2*i) + b*10**i + c for i in count(1) for a, b, c in product(primerange(10**(i-1), 10**i), repeat=3) if isprime(a+b+c)))
    print(list(islice(agen(), 36))) # Michael S. Branicky, Dec 04 2022

A376084 Number of cryptarithmically unique primes with n decimal digits.

Original entry on oeis.org

0, 1, 0, 0, 0, 0, 2, 1, 3, 18, 105
Offset: 1

Views

Author

Dmytro Inosov, Sep 09 2024

Keywords

Comments

a(n) gives the number of n-digit primes p for which no other prime shares the same digit pattern, A358497(p).
a(n) is the count of terms in A374238 of length n.
a(n) shows anomalously small values for n divisible by 3 because certain digit patterns cannot result in primes based on divisibility rules: Whenever every digit occurs a number of times that is divisible by 3, the sum of digits is also divisible by 3, and therefore the number cannot be prime. For example, for n=12 all patterns consisting of 2 distinct digits A and B with the number of both A's and B's divisible by 3 (such as "AABABAAAABAA" and alike) cannot produce primes and therefore do not contribute to the total count. As a result, a(n) is not monotonic.
It is conjectured that a(n) is asymptotic to A006879(n) as n->oo based on the combinatorial probability estimate under the assumption that asymptotically for large n, the fraction of primes among integers that share a given digit pattern would be the same as among all integers with n digits, given by p(n)=1/(n*ln10) according to the prime number theorem. Since the number of integers sharing the same digit pattern cannot exceed 9*9!, the probability for a randomly chosen prime of length n to be cryptarithmically unique >= (1-p(n))^(9*9!-1), which is asymptotic to 1 as n->oo.
The following terms are conjectured based on the assumption that at these lengths A374238 does not contain terms with 4 or more distinct digits, which follows from the vanishing probability of such terms estimated with combinatorial arguments:
a(12)=24,
a(13)=668,
a(14)=1129,
a(15)=1306,
a(16)=4263,
a(17)=17320,
a(18)=6734,
a(19)=81794.
Further conjectured terms: a(20)=125975, a(21)=180471, a(22)=852579. - Michael S. Branicky, Oct 16 2024

Examples

			a(2)=1 because the only cryptarithmically unique prime (A374238) with 2 digits is 11. Indeed, any other 2-digit natural number with the same pattern "AA" is divisible by 11, whereas no 2-digit prime with the pattern "AB" of two nonequal digits is cryptarithmically unique because there are 20 primes that share the same pattern (all 2-digit primes except 11).
a(3)=0 because there are no cryptarithmically unique primes (A374238) with 3 digits.
a(7)=2 because there are exactly two cryptarithmically unique primes with 7 digits, which are 3333311 and 7771717.
		

Crossrefs

Cf. A374238 (cryptarithmically unique primes), A004022 (prime repunits), A358497, A376918.

Formula

a(n) <= A376918(n).
a(n) <= A006879(n).
lim_{n->oo} a(n)/A006879(n)=1 (conjectured).

A160405 Primes that are the concatenation of a 5-digit prime, a 7-digit prime, and a 5-digit prime.

Original entry on oeis.org

10007100000310037, 10007100000310163, 10007100000310247, 10007100000310271, 10007100000310289, 10007100000310321, 10007100000310433, 10007100000310463, 10007100000310477
Offset: 1

Views

Author

Walter Nissen, May 13 2009

Keywords

Comments

Haiku-haiku-haiku primes. I would like to call these "Haiku primes" but it seems that name has been used by Geoffrey Caveney for a different concept. Another possible name would be haiku-formed primes, but maybe that should be reserved for primes which are formed from any number of primes of width 5 or 7. Note that if you associate the hyphens with the central word, Haiku-haiku-haiku is itself of the 5-7-5 form (in characters).

Examples

			10007, 1000003, 10037, and 10007100000310037 are all prime, so 10007100000310037 is in the sequence.
		

Crossrefs

Cf. A000040 (primes), A006879 (number of primes with n digits).

Programs

  • Magma
    [ a: p in PrimesInInterval(10000,10007), q in PrimesInInterval(1000000,1000003), r in PrimesInInterval(10000,12000) | IsPrime(a) where a is Seqint(Intseq(r) cat Intseq(q) cat Intseq(p)) ]; // Klaus Brockhaus, May 20 2009

Extensions

Edited by Klaus Brockhaus, May 20 2009

A229661 Rounded percentage of primes less than 10^n.

Original entry on oeis.org

0, 40, 25, 17, 12, 10, 8, 7, 6, 5, 5, 4, 4, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 0

Views

Author

Jean-François Alcover, Sep 27 2013

Keywords

Comments

Please refer to the explanations and comments given in A006879 and A006880.

Examples

			There are 4 primes less than 10 (i.e., 2, 3, 5, 7), so a(1) = 40.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := PrimePi[10^n]/10^(n-2) // Round;
    (* or *) a[n_] := A006880[[n+1]]/10^(n-2) // Round; Table[Print["10^", n, " ", a[n], "%"]; a[n], {n, 0, 25}] (* Jean-François Alcover, Sep 27 2013 *)

Formula

a(n) = pi(10^n)/10^(n-2) rounded.

A304520 a(n) is the number of n-digit prime powers.

Original entry on oeis.org

7, 28, 158, 1087, 8420, 69034, 586400, 5097725, 45088364, 404211372, 3663020374, 33489909119, 308457775318, 2858876653517, 26639629964435, 249393774431034, 2344318827962046, 22116397163892861, 209317713089716899, 1986761935587919881, 18906449884370307192
Offset: 1

Views

Author

Jon E. Schoenfield, May 13 2018

Keywords

Comments

"Prime powers" here are defined as in A246655, so 1 is not counted here as a prime power.
For the number of n-digit primes, see A006879.

Examples

			a(1) = 7 because there are 7 1-digit numbers that are prime powers: 2=2^1, 3=3^1, 4=2^2, 5=5^1, 7=7^1, 8=2^3, and 9=3^2.
a(2) = 28 because there are 28 2-digit prime powers: the 21 2-digit primes (11, 13, ..., 97), 2 squares of primes (25=5^2 and 49=7^2), 1 cube of a prime (27=3^3), 2 fourth powers of primes (16=2^4 and 81=3^4), 1 fifth power of a prime (32=2^5), and 1 sixth power of a prime (64=2^6).
		

Crossrefs

Cf. A006879, A246655, A267712 (partial sums).

Programs

  • Magma
    /* gives first 9 terms */ a:=[]; for n in [1..9] do tMin:=10^(n-1); tMax:=10^n-1; c:=0; for k in [1..Floor(Log(2,tMax))] do pMin:=Ceiling(tMin^(1/k)); pMax:=Floor(tMax^(1/k)); if pMin le pMax then c+:=#PrimesInInterval(pMin,pMax); end if; end for; a[n]:=c; end for; a;
  • Mathematica
    Prepend[Differences@ #, First@ #] &@ Array[Sum[PrimePi[10^(#/k)], {k, # Log2@ 10}] &, 12] (* Michael De Vlieger, May 20 2018, after Robert G. Wilson v at A267712 *)

A328032 If there are m primes between 10^(n-1) and 10^n, a(n) is the middle prime if m is odd, otherwise the larger of the two middle primes.

Original entry on oeis.org

5, 47, 509, 5273, 53047, 532907, 5356259, 53765519, 539119753, 5402600081, 54118210441, 541947386821, 5425907665571, 54313871643797, 543611236251491, 5440228524355381, 54438462600610513, 544705097744731559, 5449909581264135103
Offset: 1

Views

Author

Robert G. Wilson v, Oct 02 2019

Keywords

Comments

This sequence, unlike A309329, only contains primes.
For n > 2, a(n) > 10*a(n-1) for the terms shown. Does this continue?
The prime index of a(n): 3, 15, 97, 699, 5411, 44046, 371539, 3213018, 28304495, 252950023, 2286553663, 20862983416, 191836724429, 1775503643821, 16524756086736, 154541455728298, 1451397749344080, 13681755722697547, 129398810782042734, 1227438634918631724, 11674044544289825385, 111297278087667319110, 1063393839148059937607, 10180460079478002418395, 97640954583246485139774, 938046530135790455369642, 9025853588857058793877502, ..., .

Examples

			a(1) is 5 since, among the single-digit primes, i.e., {2, 3, 5, 7}, the two middle primes are {3, 5}, of which the larger one is 5;
a(2) is 47 since it is the middle prime of the two-digit primes, i.e., {11, 13, 17, ..., 47, ..., 83, 89, 97};
a(3) is 509 since it is the middle prime of the three-digit primes, i.e., {101, 103, 107, ..., 509, ..., 983, 991, 997}.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{p = PrimePi[ 10^(n -1)], q = PrimePi[ 10^n]}, Prime[ Ceiling[(q +p +1)/2]]]; Array[f, 13]

Formula

a(n) is the next prime after A309329(n) - 1.

A332265 a(n) is the number of prime numbers created when concatenating all the arrangements of the decimal integers from 0 to 3*n+4.

Original entry on oeis.org

20, 3202, 2056675, 3500185228
Offset: 0

Views

Author

Scott R. Shannon, May 04 2020

Keywords

Comments

Only 4 and every third integer after 4 can create primes when concatenating the integer arrangements of 0,...,3*n+4 as the other integer values will create numbers with digit sums divisible by 3, and hence are divisible by 3. The digit 0 is allowed to be the first digit in the number but is then ignored when determining if the remaining digits form a prime.

Examples

			a(0) = 20 as there are twenty primes created when concatenating the integer arrangements of 0,1,2,3,4. They are 1423, 2143, 2341, 4231, 10243, 12043, 20143, 20341, 20431, 23041, 24103, 30241, 32401, 40123, 40213, 40231, 41023, 41203, 42013, 43201.
a(1) = 3202. The smallest prime created using integers 0..7 is 1234657 while the largest is 76540231.
a(2) = 2056675. The smallest prime created using integers 0..10 is 10123457689 while the largest is 987654310021.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[FromDigits /@  Flatten /@ IntegerDigits /@ Permutations[Range[0, 3 n + 4]], ?PrimeQ], {n, 0, 2}] (* _Robert Price, Sep 16 2020 *)
    (* OR, if the above runs low on memory to store all the Permutations at once... *)
    Table[p0 = Range[0, 3n+4]; p = NextPermutation[p0]; c = 0;
     While[p != p0,
      If[PrimeQ[FromDigits[Flatten[IntegerDigits /@ p]]], c++];
    p = NextPermutation[p]]; c, {n, 0, 2}] (* Robert Price, Sep 16 2020 *)

Extensions

a(3) from Giovanni Resta, May 04 2020

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

A374402 Least number that is the lesser of two consecutive primes p and q whose binary expansions have the same length and agree at exactly n digit positions, or -1 if no such prime pair exists.

Original entry on oeis.org

2, 5, 23, 17, 41, 67, 137, 269, 521, 1049, 2081, 4111, 8233, 16417, 32771, 65537, 131113, 262147, 524309, 1048609, 2097257, 4194389, 8388617, 16777289, 33554501, 67109123, 134217929, 268435459, 536871017, 1073741827, 2147484041, 4294967497, 8589934627, 17179869731
Offset: 1

Views

Author

Jean-Marc Rebert, Jul 07 2024

Keywords

Examples

			a(1) = 2 because 2 = 10_2 and 3 = 11_2 are two consecutive primes that, when written in base 2, both have 2 digits and agree at exactly 1 digit position (each has a 1 in its first digit position), and no earlier pair of consecutive primes has this property.
a(3) = 23 = 10111_2; the next prime is
       29 = 11101_2  (same number of binary digits),
            ^ ^ ^    and the digits agree at 3 digit positions,
  and no earlier pair of consecutive primes has this property.
		

Crossrefs

Programs

  • PARI
    card(p)=my(u=binary(p),v=binary(nextprime(p+1))); if(#u!=#v,return(0)); sum(i=1,#u,u[i]==v[i])
    a(n)=forprime(p=2^n,oo,if(card(p)==n,return(p)))
Previous Showing 41-50 of 50 results.