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.

A382811 Integers k such that d*2^k - 1 is prime for some divisor d of k.

This page as a plain text file.
%I A382811 #40 Apr 25 2025 15:56:15
%S A382811 2,3,4,5,6,7,10,12,13,16,17,18,19,21,28,30,31,36,42,46,54,60,61,63,75,
%T A382811 81,88,89,99,102,104,106,107,108,115,123,126,127,132,133,204,214,216,
%U A382811 225,249,264,270,286,304,306,324,330,342,352,362,384,390
%N A382811 Integers k such that d*2^k - 1 is prime for some divisor d of k.
%H A382811 Robert Israel, <a href="/A382811/b382811.txt">Table of n, a(n) for n = 1..161</a>
%e A382811 4 is in the sequence because 2*2^4 - 1 = 31 is prime for divisor d = 2 of k = 4.
%p A382811 filter:= proc(k) ormap(d -> isprime(d*2^k-1),numtheory:-divisors(k)) end proc:
%p A382811 select(filter, [$1..700]); # _Robert Israel_, Apr 25 2025
%t A382811 q[k_] := AnyTrue[Divisors[k], PrimeQ[#*2^k - 1] &]; Select[Range[400], q] (* _Amiram Eldar_, Apr 16 2025 *)
%o A382811 (Magma) [k: k in [1..400] | not #[d: d in Divisors(k) | IsPrime(d*2^k-1)] eq 0];
%o A382811 (PARI) isok(k) = fordiv(k, d, if (ispseudoprime(d*2^k-1), return(1))); \\ _Michel Marcus_, Apr 16 2025
%Y A382811 Supersequence of A000043, A002234.
%K A382811 nonn
%O A382811 1,1
%A A382811 _Juri-Stepan Gerasimov_, Apr 15 2025