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 10 results.

A359121 a(n) = number of terms of A068811 that are <= n.

Original entry on oeis.org

0, 0, 1, 1, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12
Offset: 1

Views

Author

N. J. A. Sloane, Dec 18 2022

Keywords

Comments

This is to A068811 as pi = A000720 is to the primes.

Examples

			A068811 begins 3, 5, 7, ..., so the present sequence begins 0, 0, 1, 1, 2, 2, 3, ..., with an increment as each term of A068811 is reached.
		

Crossrefs

Programs

  • Mathematica
    c = 0; Reap[Do[If[AllTrue[{n, 10^(1 + Floor@ Log10[n]) - n}, PrimeQ], c++]; Sow[c], {n, 86}]][[-1, -1]] (* Michael De Vlieger, Dec 18 2022 *)

A359122 Index of prime(n) in A068811, or -1 if prime(n) is missing from A068811.

Original entry on oeis.org

-1, 1, 2, 3, 4, -1, 5, -1, -1, 6, -1, -1, 7, -1, 8, 9, 10, -1, -1, 11, -1, -1, 12, 13, 14, -1, -1, -1, -1, 15, -1, -1, 16, -1, -1, -1, -1, -1, -1, 17, 18, -1, 19, -1, -1, -1, -1, -1, 20, -1, -1, 21, -1, -1, 22, -1, -1, -1, -1, 23, -1, -1, -1, -1, -1, 24, -1, -1, 25, -1, 26, 27, -1
Offset: 1

Views

Author

N. J. A. Sloane, Dec 18 2022

Keywords

Examples

			Prime(4) = 7 is the third term in A068811, so a(4) = 3.
Prime(6) = 13 is missing from A068811, so a(6) = -1.
		

Crossrefs

Programs

  • Mathematica
    c = 1; Reap[Do[Sow@ If[PrimeQ[10^(1 + Floor@ Log10[#]) - #], c++, -1] &[Prime[n]], {n, 73}]][[-1, -1]] (* or, generate nn <= 10^6 terms of this sequence from the bitmap: *)
    Block[{nn = 10^4, s = Flatten@ ImageData[Import["https://oeis.org/A359122/a359122.png"]] /. {1. -> 0, 0. -> 1}, c}, c = 1; Map[If[# == 0, -1, c++] &, s[[1 ;; nn]]]] (* Michael De Vlieger, Dec 18 2022 *)

A359123 First differences of A068811, halved.

Original entry on oeis.org

1, 1, 2, 3, 6, 6, 3, 3, 3, 6, 6, 3, 4, 8, 12, 18, 3, 6, 18, 6, 9, 12, 18, 15, 3, 3, 12, 9, 15, 6, 18, 6, 9, 6, 18, 6, 15, 9, 12, 3, 3, 15, 18, 12, 9, 6, 18, 6, 3, 18, 12, 12, 9, 6, 3, 3, 9, 3, 3, 7, 17, 9, 51, 6, 9, 6, 12, 21, 21, 3, 6, 27, 27, 30, 6, 27, 9, 21, 12, 36, 84, 6
Offset: 1

Views

Author

N. J. A. Sloane, Dec 18 2022

Keywords

Crossrefs

Programs

  • Mathematica
    1/2*Differences@ Select[Prime@ Range[300], PrimeQ[10^(1 + Floor@ Log10[#]) - #] &] (* Michael De Vlieger, Dec 18 2022 *)

A092564 Duplicate of A068811.

Original entry on oeis.org

3, 5, 7, 11, 17, 29, 41, 47, 53, 59, 71, 83, 89, 97, 113, 137, 173, 179, 191, 227, 239, 257
Offset: 1

Views

Author

Keywords

A145987 Duplicate of A068811.

Original entry on oeis.org

3, 5, 7, 11, 17, 29, 41, 47, 53, 59, 71, 83, 89, 97, 113, 137, 173, 179, 191, 227, 239, 257, 281, 317, 347, 353, 359, 383, 401, 431, 443, 479, 491, 509, 521, 557, 569, 599, 617, 641, 647, 653, 683, 719, 743, 761, 773, 809, 821, 827, 863, 887, 911, 929, 941, 947, 953, 971, 977, 983, 997
Offset: 1

Views

Author

Keywords

A086081 Numbers m such that m and its 2's complement are both primes. In other words, m and 2^k - m (where k is the smallest power of 2 such that 2^k > m) are primes.

Original entry on oeis.org

2, 5, 11, 13, 19, 29, 41, 47, 53, 59, 61, 67, 97, 109, 149, 167, 173, 197, 227, 233, 239, 251, 271, 283, 313, 331, 349, 373, 409, 433, 439, 499, 509, 521, 557, 563, 593, 641, 677, 743, 761, 773, 797, 827, 857, 887, 911, 941, 953, 971, 977, 983, 1013, 1019, 1021
Offset: 1

Views

Author

Chuck Seggelin, Jul 08 2003

Keywords

Comments

In the first 672509 primes, 64894 of them (about 9.65%) are 2's-complement primes.

Examples

			19 is a term because 19 is prime and (2^5 - 19) = (32 - 19) = 13 which is prime.
1777 is a term because 1777 is prime and (2^11 - 1777) = (2048 - 1777) = 271 which is prime.
		

Crossrefs

Cf. A068811.

Programs

  • Mathematica
    Join[{2}, Select[Prime[Range[250]], PrimeQ[BitXor[#, 2^Ceiling[Log[2, #]] - 1] + 1] &]] (* Alonso del Arte, Feb 12 2013 *)
  • PARI
    select(m->isprime((2<<(log(m+.5)\log(2)))-m), primes(100)) \\ Charles R Greathouse IV, Feb 13 2013

Formula

If isPrime(p) And isPrime(2^(floor(Log(p, 2)) + 1) - p) then sequence.add(p)
If A(x) is the counting function of the terms a(n) <= x, then A(x) = O(xloglogx/(logx)^2) [From Vladimir Shevelev, Dec 04 2008]

A145985 Primes resulting from subtracting primes from 10^n in order (see Comments for precise definition).

Original entry on oeis.org

7, 5, 3, 89, 83, 71, 59, 53, 47, 41, 29, 17, 11, 3, 887, 863, 827, 821, 809, 773, 761, 743, 719, 683, 653, 647, 641, 617, 599, 569, 557, 521, 509, 491, 479, 443, 431, 401, 383, 359, 353, 347, 317, 281, 257, 239, 227, 191, 179, 173, 137, 113, 89, 71, 59, 53, 47, 29, 23, 17, 3, 8969, 8951, 8849, 8837, 8819, 8807, 8783
Offset: 1

Views

Author

Enoch Haga, Oct 27 2008

Keywords

Comments

Comments from N. J. A. Sloane, Dec 18 2022 (Start)
A more precise definition is the following.
Start with k=1; let N=10^k, let i run from 10^(k-1)-1 to N-1, let j = N-i, if i and j are both primes, append j to the sequence; increment k.
This is derived from A068811 via a(n) = 10^d - A068811(n) where d is the number of digits in A068811(n). A068811 is more fundamental, for there the primes appear in order and there are no duplicates. (End)
Primes may appear more than once.

Examples

			887 is a term because 1000-887 = 113 and both 887 and 113 are prime.
		

Crossrefs

See A359120 for the length of the n-th block of decreasing terms.

Programs

  • Maple
    a:=[];
    for k from 1 to 6 do
    N := 10^k;
       for i from 10^(k-1)+1 to N-1 do
          j:=N-i;
          if isprime(i) and isprime(j) then a:=[op(a),j]; fi;
       od:
    od;
    a; # N. J. A. Sloane, Dec 16 2022
  • Mathematica
    Select[Table[10^IntegerLength[p]-p,{p,Prime[Range[200]]}],PrimeQ] (* Harvey P. Dale, Dec 16 2022 *)

Extensions

Corrected and edited by Harvey P. Dale and N. J. A. Sloane, Dec 16 2022

A087325 Numbers k such that k and its 10's complement both have the same prime signature.

Original entry on oeis.org

3, 5, 7, 11, 14, 15, 17, 26, 29, 30, 35, 38, 41, 47, 50, 53, 59, 62, 65, 70, 71, 74, 83, 85, 86, 89, 94, 97, 110, 111, 113, 122, 129, 132, 134, 137, 140, 150, 153, 158, 170, 173, 174, 179, 183, 185, 186, 187, 191, 195, 201, 206, 209, 212, 215, 219, 221, 227, 236
Offset: 1

Views

Author

Amarnath Murthy, Sep 04 2003

Keywords

Comments

Conjecture: (1) Sequence is infinite. (2) For every prime signature there corresponds a term in this sequence.
From Robert Israel, Jul 02 2024: (Start)
Conjecture (2) is false: k and its 10's complement can't both have prime signature p^m where m is even.
If k is a term, then so is 10 * k.
It appears that the first term with m prime factors, counted with multiplicity, is 3 * 10^((m-1)/2) if m is odd and 132 * 10^((m-4)/2) if m >= 4 is even. (End)

Examples

			35 is a member as 35= 5*7 and its 10's complement (100-35) = 65 = 13*5 both have the prime signature p*q.
35 is a member as 35 = 5*7 and its 10's complement (100-35) = 65 = 13*5 both have the prime signature p*q.
		

Crossrefs

Cf. A087324, A089186. Contains A068811.

Programs

  • Maple
    ps:= n -> sort(ifactors(n)[2][..,2]):
    tc:= n -> 10^(1+ilog10(n))-n:
    select(n -> ps(n) = ps(tc(n)), [$1..1000]); # Robert Israel, Jul 02 2024

Extensions

More terms from David Wasserman, May 06 2005

A228075 Numbers n whose 10's complement is prime, i.e., 10^k-n, where k is the number of digits of n, is prime.

Original entry on oeis.org

3, 5, 7, 8, 11, 17, 21, 27, 29, 33, 39, 41, 47, 53, 57, 59, 63, 69, 71, 77, 81, 83, 87, 89, 93, 95, 97, 98, 113, 117, 119, 123, 137, 141, 143, 147, 161, 171, 173, 177, 179, 189, 191, 203, 213, 227, 231, 239, 243, 249, 257, 261, 267, 273, 281, 291, 299
Offset: 1

Views

Author

Jayanta Basu, Aug 09 2013

Keywords

Comments

A068811 is a subset.

Examples

			8 is a term since 10^1 - 8 = 2 is a prime.
Similarly, 39 is a term as 10^2 - 39 = 61 is prime.
		

Crossrefs

Cf. A068811.

Programs

  • Mathematica
    Select[Range[300], PrimeQ[10^(IntegerLength[#]) - #] &]

A086082 Numbers m such that m and all of its even complements from 2 to 10 are primes. In other words, m and j^k - m (where k is the smallest power of j such that j^k > m) are prime for all of the following values of j: 2, 4, 6, 8, 10.

Original entry on oeis.org

53, 59, 557, 773, 887, 2207, 2273, 2543, 2789, 3209, 3449, 3677, 33347, 33893, 36887, 41927, 54323, 61547, 131303, 131687, 136217, 138143, 139493, 140177, 150083, 150533, 153353, 153437, 154277, 157007, 158303, 161333, 162263, 163847, 166157
Offset: 1

Views

Author

Chuck Seggelin, Jul 08 2003

Keywords

Comments

Primes meeting the requirements to be members of this sequence are fairly rare. The 653rd prime in this sequence is the 672448th prime in the sequence of all primes (i.e., 0.0971% of the first 672448 primes belong to this sequence). Primes which need only be j-complement for one value of j (such as 6-complement primes) are relatively common (in the first 672509 primes, 122932 are 6-complement primes, or about 18.28%).
Odd complement primes are very rare, simply because any odd number raised to a power yields an odd number. Subtracting from this an odd prime yields an even number that cannot be prime unless it is 2. As a result, odd-complement primes are either 2 or of the form j^k-2 - for example, the first few 7's complement primes are 2, 5 (7^1-2), 47 (7^2-2), 2399 (7^4-2), 823541 (7^7-2), 5764799 (7^8-2), 13841287199 (7^12-2), 4747561509941 (7^15-2) and so forth. This is a natural result of the fact that most primes are odd and so are odd numbers when raised to any power > 0.

Examples

			887 is a term because i: 887 is prime. ii: (2^10 - 887) = (1024 - 887) = 137 which is prime. iii: (4^5 - 887) = (1024 - 887) = 137 which is prime. iv: (6^4 - 887) = (1296 - 887) = 409 which is prime. v: (8^4 - 887) = (4096 - 887) = 3209 which is prime. vi: (10^3 - 887) = (1000 - 887) = 113 which is prime.
		

Crossrefs

Formula

If isPrime(p) And isPrime(2^(floor(Log(p, 2))+1)-p) And isPrime(4^(floor(Log(p, 4))+1)-p) And isPrime(6^(floor(Log(p, 6))+1)-p) And isPrime(8^(floor(Log(p, 8))+1)-p) And isPrime(10^(floor(Log(p, 10))+1)-p) then sequence.add(p)
Showing 1-10 of 10 results.