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.

A058500 Primes of the form p*2^k + 1, where p is an odd prime and k > 0.

Original entry on oeis.org

7, 11, 13, 23, 29, 41, 47, 53, 59, 83, 89, 97, 107, 113, 137, 149, 167, 173, 179, 193, 227, 233, 263, 269, 293, 317, 347, 353, 359, 383, 389, 449, 467, 479, 503, 509, 557, 563, 569, 587, 593, 641, 653, 719, 769, 773, 797, 809, 839, 857, 863, 887, 929, 977
Offset: 1

Views

Author

Labos Elemer, Dec 20 2000

Keywords

Examples

			719 is a term because 719 = 2*359 + 1 and 359 is prime.
		

Crossrefs

Cf. A074781 (this sequence and the Fermat primes), A147545.

Programs

  • Mathematica
    mx = 1000; Select[ Sort@ Flatten@ Table[Prime[p] 2^k + 1, {p, 2, PrimePi[ mx/2]}, {k, Log2[ mx/Prime[ p]]}], PrimeQ] (* or *)
    fQ[n_] := Block[{m = n -1}, PrimeQ[m/2^IntegerExponent[m, 2]]]; Select[
    Prime@ Range@ PrimePi@ mx, fQ] (* Robert G. Wilson v, Feb 09 2018 *)
  • PARI
    isoka(p) = isprime(p) && (pp=p-1) && isprime(pp/2^valuation(pp, 2)); \\ Michel Marcus, Feb 09 2018

Extensions

Revised definition from T. D. Noe, Nov 03 2008