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.

This page as a plain text file.
%I A058500 #28 Sep 25 2021 06:49:11
%S A058500 7,11,13,23,29,41,47,53,59,83,89,97,107,113,137,149,167,173,179,193,
%T A058500 227,233,263,269,293,317,347,353,359,383,389,449,467,479,503,509,557,
%U A058500 563,569,587,593,641,653,719,769,773,797,809,839,857,863,887,929,977
%N A058500 Primes of the form p*2^k + 1, where p is an odd prime and k > 0.
%H A058500 Amiram Eldar, <a href="/A058500/b058500.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..2000 from T. D. Noe)
%e A058500 719 is a term because 719 = 2*359 + 1 and 359 is prime.
%t A058500 mx = 1000; Select[ Sort@ Flatten@ Table[Prime[p] 2^k + 1, {p, 2, PrimePi[ mx/2]}, {k, Log2[ mx/Prime[ p]]}], PrimeQ] (* or *)
%t A058500 fQ[n_] := Block[{m = n -1}, PrimeQ[m/2^IntegerExponent[m, 2]]]; Select[
%t A058500 Prime@ Range@ PrimePi@ mx, fQ] (* _Robert G. Wilson v_, Feb 09 2018 *)
%o A058500 (PARI) isoka(p) = isprime(p) && (pp=p-1) && isprime(pp/2^valuation(pp, 2)); \\ _Michel Marcus_, Feb 09 2018
%Y A058500 Cf. A057023, A006093.
%Y A058500 Cf. A074781 (this sequence and the Fermat primes), A147545.
%K A058500 nonn
%O A058500 1,1
%A A058500 _Labos Elemer_, Dec 20 2000
%E A058500 Revised definition from _T. D. Noe_, Nov 03 2008