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.

A382646 Numbers k such that (k*2^d - 1)*(d*2^k - 1) is semiprime for some divisor d of k.

This page as a plain text file.
%I A382646 #28 Apr 16 2025 05:31:18
%S A382646 2,3,6,7,12,18,19,21,30,31,42,60,75,81,115,123,126,132,133,225,249,
%T A382646 306,324,362,384,462,468,512,606,607,612,751,822,1279,2170,2202,2281,
%U A382646 5312,7755,9531,12379,14898,15822,18123,18819,18885,22971,23005,23208,41628,44497,51384,52540,98726
%N A382646 Numbers k such that (k*2^d - 1)*(d*2^k - 1) is semiprime for some divisor d of k.
%C A382646 No further terms <= 10^5. - _Michael S. Branicky_, Apr 07 2025
%e A382646 7 is in this sequence because (7*2^1-1)*(1*2^7-1) = 13*127 is semiprime for divisor 1 of 7.
%o A382646 (Magma) [n: n in [1..1000] | not #[d: d in Divisors(n) | IsPrime(d*2^n-1) and IsPrime(n*2^d-1)] eq 0];
%o A382646 (PARI) isok(k) = fordiv(k, d, if (ispseudoprime(k*2^d - 1) && ispseudoprime(d*2^k - 1), return(1))); \\ _Michel Marcus_, Apr 02 2025
%o A382646 (Python)
%o A382646 from itertools import count, islice
%o A382646 from sympy import isprime, divisors
%o A382646 def A382646_gen(): # generator of terms
%o A382646     yield from filter(lambda k:any(isprime((k<<d)-1) and isprime((d<<k)-1) for d in divisors(k, generator=True)), count(1))
%o A382646 A382646_list = list(islice(A382646_gen(), 30)) # _Chai Wah Wu_, Apr 15 2025
%Y A382646 Supersequence of A002234.
%Y A382646 Cf. A001358, A003261, A382887.
%K A382646 nonn
%O A382646 1,1
%A A382646 _Juri-Stepan Gerasimov_, Apr 01 2025
%E A382646 a(40) from _Michel Marcus_, Apr 02 2025
%E A382646 a(41)-a(54) from _Michael S. Branicky_, Apr 07 2025