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 21-25 of 25 results.

A217349 Numbers k such that 4^k + 7 is prime.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 9, 10, 14, 15, 19, 22, 39, 44, 49, 63, 80, 87, 102, 107, 294, 305, 399, 463, 595, 599, 903, 944, 1324, 1727, 1755, 1932, 1935, 4485, 6165, 6665, 9438, 11169, 19859, 27503, 55392, 86235, 98217, 117855, 123640, 134204, 139660, 150437, 157634, 186475, 236129, 283248, 390142, 410178
Offset: 1

Views

Author

Vincenzo Librandi, Oct 01 2012

Keywords

Comments

The next terms are > 4.1*10^5. - Elmo R. Oliveira, Nov 29 2023

Examples

			For k = 14, 4^14 + 7 = 268435463 is prime.
		

Crossrefs

Cf. A057195, A059266, A089437, A104066 (associated primes).

Programs

  • Mathematica
    Select[Range[0, 5000], PrimeQ[4^# + 7] &]
  • PARI
    is(n)=ispseudoprime(4^n+7) \\ Charles R Greathouse IV, Jun 06 2017

Formula

a(n) = A057195(n)/2.

Extensions

Extended using A057195 terms by Michel Marcus, Aug 28 2015
a(51)-a(54) derived from A057195 by Elmo R. Oliveira, Nov 29 2023

A296806 Take a prime, convert it to base 2, remove its most significant digit and its least significant digit and convert it back to base 10. Sequence lists primes that generate another prime by this process.

Original entry on oeis.org

13, 23, 31, 37, 43, 47, 59, 71, 79, 103, 127, 139, 151, 163, 167, 191, 211, 223, 251, 263, 271, 283, 331, 379, 463, 523, 547, 571, 587, 599, 607, 619, 631, 647, 659, 691, 719, 727, 739, 787, 811, 827, 839, 859, 907, 911, 967, 971, 991, 1031, 1039, 1051, 1063, 1087
Offset: 1

Views

Author

Paolo P. Lava, Paolo Iachia, Dec 21 2017

Keywords

Comments

From an idea of Ken Abbott (see link).
From Paolo Iachia, Dec 21 2017: (Start)
Let us call these numbers "core of a prime".
Let C(q) be the core of a prime q.
Then C(q) = (q - 2^floor(log_2(q)) - 1)/2.
Examples: C(59) = (59 - 2^5 - 1)/2 = 13; C(71) = (71 - 2^6 - 1)/2 = 3; C(73) = (73 - 2^6 - 1)/2 = 4; C(251) = (251 - 2^7 - 1)/2 = 61.
0 <= C(q) <= 2^(floor(log_2(q)) - 1) - 1. The minimum (0) occurs when q = 2^n+1, with n > 2. Example: 17 = 2^4+1, C(17) = (17 - 2^4 - 1)/2 = 0. The maximum is reached when q = 2^n-1 is a Mersenne prime. Example: 127 = 2^7 - 1, C(127) = (127 - 2^6 - 1)/2 = 31 = 2^5 - 1.
The last example is particularly interesting, as both the prime q and its core are Mersenne primes. The same holds for C(31) = 7 and for C(524247) = 131071, with 524247 = 2^19-1 and 131071 = 2^17-1, both Mersenne primes. Are there more such cases?
Note that the core of Mersenne number (prime or not) is a Mersenne number by definition. Counterexamples include C(8191) = 2047, with 8191 = 2^13 - 1, a Mersenne prime, but 2047 = 2^11 - 1 = 23*89, a Mersenne number not prime, and C(131071) = 32767 = 2^15 - 1 = 7*31*151, with 2 of its factors being Mersenne primes.
Primes whose binary expansion is of the form q = 1 0 ... 0 c_1 c_2 ... c_k 1 - with none or any number of consecutive 0's and with binary core c_1 c_2 ... c_k, k >= 0 - share the same core value. Let p = C(q), then we can write, in decimal form, q = (2p+1) + 2^n, for an appropriate n. While the property is true for p prime, it can be generalized to any positive integer.
Conjecture: for any positive integer p, there are infinitely many primes q for which there exists an integer n such that q-(2p+1) = 2^n. (End)

Examples

			13 in base 2 is 1101 and 10 is 2;
23 in base 2 is 10111 and 011 is 3;
31 in base 2 is 11111 and 111 is 7.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,c,j,n,ok,x;  x:=5; for n from x to q do ok:=1; a:=convert(ithprime(n),base,2); b:=nops(a)-1; while a[b]=0 do b:=b-1; od; c:=0;
    for j from b by -1 to 2 do c:=2*c+a[j]; od;if isprime(c) then x:=n; print(ithprime(n)); fi; od; end: P(10^6);
    # simpler alternative:
    select(t -> isprime(t) and isprime((t - 2^ilog2(t) - 1)/2), [seq(i,i=3..10^4,2)]); # Robert Israel, Dec 28 2017
  • Mathematica
    Select[Prime[Range[200]],PrimeQ[FromDigits[Most[Rest[IntegerDigits[ #,2]]],2]]&] (* Harvey P. Dale, Jul 19 2020 *)
  • PARI
    lista(nn) = forprime(p=13, nn, if(isprime((p - 2^logint(p, 2) - 1)/2), print1(p, ", "))) \\ Iain Fox, Dec 28 2017
    
  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        p = 7
        while True:
            if isprime(int(bin(p)[3:-1], 2)):
                yield p
            p = nextprime(p)
    print(list(islice(agen(), 54))) # Michael S. Branicky, May 16 2022

Formula

Primes q such that C(q) = (q - 2^floor(log_2(q)) - 1)/2 is prime too.

A217381 Numbers k such that 8^k + 7 is prime.

Original entry on oeis.org

2, 6, 10, 26, 42, 58, 68, 196, 266, 602, 1170, 1288, 1290, 2990, 4110, 6292, 7446, 36928, 57490, 65478, 78570, 188832, 273452
Offset: 1

Views

Author

Vincenzo Librandi, Oct 02 2012

Keywords

Comments

All terms are equal to 1/3 of the multiples of 3 in A057195.
Naturally these numbers are even because (9-1)^(2n+1)+7 is divisible by 3. - Bruno Berselli, Oct 03 2012

Crossrefs

Cf. A144360 (associated primes).

Programs

  • Mathematica
    Select[Range[10000], PrimeQ[8^# + 7] &]
  • PARI
    is(n)=ispseudoprime(8^n+7) \\ Charles R Greathouse IV, Jun 13 2017

Extensions

a(18)-a(22) from A057195 by Robert Price, Jul 23 2017
a(23) from the data at A057195 added by Amiram Eldar, Jul 23 2025

A155779 Primes p such that 2^(p-1)+7 is prime.

Original entry on oeis.org

3, 5, 7, 11, 17, 19, 29, 31, 79, 89, 127, 1889, 3511, 8971, 13331
Offset: 1

Views

Author

Vincenzo Librandi, Jan 27 2009

Keywords

Comments

Primes of the form 1+A057195(k). [R. J. Mathar, Feb 19 2009]

Programs

  • Mathematica
    Select[Prime[Range[15000]], PrimeQ[(2^(# - 1) + 7)] &] (* Vincenzo Librandi, Jun 24 2013 *)

A361744 A(n,k) is the least m such that there are k primes in the set {prime(n) + 2^i | 1 <= i <= m}, or -1 if no such number exists; square array A(n,k), n > 1, k >= 1, read by antidiagonals.

Original entry on oeis.org

1, 2, 1, 3, 3, 2, 4, 5, 4, 1, 6, 11, 6, 3, 2, 7, 47, 8, 5, 4, 1, 12, 53, 10, 7, 8, 13, 2, 15, 141, 16, 9, 20, 21, 6, 3, 16, 143, 18, 15, 38, 33, 30, 7, 1, 18, 191, 20, 23, 64, 81, 162, 39, 3, 4, 28, 273, 28, 29, 80, 129, 654, 79, 5, 12, 2
Offset: 2

Views

Author

Jean-Marc Rebert, Mar 22 2023

Keywords

Examples

			p = prime(2) = 3, m=1, u = {p + 2^k | 1 <= k <= m} = {5} contains one prime, and no lesser m satisfies this, so A(2,1) = 1.
Square array A(n,k) n > 1 and k >= 1 begins:
 1,     2,     3,     4,     6,     7,    12,    15,    16,    18, ...
 1,     3,     5,    11,    47,    53,   141,   143,   191,   273, ...
 2,     4,     6,     8,    10,    16,    18,    20,    28,    30, ...
 1,     3,     5,     7,     9,    15,    23,    29,    31,    55, ...
 2,     4,     8,    20,    38,    64,    80,   292,  1132,  4108, ...
 1,    13,    21,    33,    81,   129,   285,   297,   769,  3381, ...
 2,     6,    30,   162,   654,   714,  1370,  1662,  1722,  2810, ...
 3,     7,    39,    79,   359,   451,  1031,  1039, 11311, 30227, ...
 1,     3,     5,     7,     9,    13,    15,    17,    23,    27, ...
		

Crossrefs

Cf. A057732 (1st row), A094076 (1st column).
Cf. A361679.
Cf. A019434 (primes 2^n+1), A057732 (2^n+3), A059242 (2^n+5), A057195 (2^n+7), A057196(2^n+9), A102633 (2^n+11), A102634 (2^n+13), A057197 (2^n+15), A057200 (2^n+17), A057221 (2^n+19), A057201 (2^n+21), A057203 (2^n+23).
Cf. A205558 and A231232 (with 2*k instead of 2^k).

Programs

  • PARI
    A(n, k)= {my(nb=0, p=prime(n), m=1); while (nb
    				
Previous Showing 21-25 of 25 results.