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.

A350101 Numbers k such that 2*k-1 and 2*k+1 are squarefree semiprimes (A046388).

This page as a plain text file.
%I A350101 #13 Nov 11 2022 13:16:50
%S A350101 17,28,43,46,47,71,72,80,92,93,101,102,107,108,109,110,118,124,133,
%T A350101 150,151,152,160,161,164,170,196,197,206,207,208,223,226,235,236,258,
%U A350101 259,267,268,272,276,290,291,295,317,334,335,340,343,344,348,349,361,377,390
%N A350101 Numbers k such that 2*k-1 and 2*k+1 are squarefree semiprimes (A046388).
%H A350101 Robert Israel, <a href="/A350101/b350101.txt">Table of n, a(n) for n = 1..10000</a>
%e A350101 a(1) = 17: 2*17 - 1 = 33 = 3*11 and 2*17 + 1 = 35 = 5*7 are both in A046388.
%p A350101 N:= 1000: # for terms <= N
%p A350101 P:= select(isprime,[seq(i,i=3..2*N/3,2)]):
%p A350101 S:= NULL:
%p A350101 for i from 1 to nops(P) do
%p A350101   for j from 1 to i-1 while P[i]*P[j] <= 2*N+1 do S:= S,P[i]*P[j] od
%p A350101 od:
%p A350101 S:= {S}:
%p A350101 T:= S intersect map(`-`,S,2):
%p A350101 sort(convert(map(t -> (t+1)/2, T),list)); # _Robert Israel_, Nov 11 2022
%t A350101 semiQ[n_] := FactorInteger[n][[;; , 2]] == {1, 1}; Select[Range[400], AllTrue[2*# + {-1, 1}, semiQ] &] (* _Amiram Eldar_, Dec 14 2021 *)
%o A350101 (PARI) a350101(limit) = {my(sp(k)=omega(k)==2&&bigomega(k)==2);forstep(k=2,2*limit,2, if(sp(k-1)&&sp(k+1),print1(k/2,", ")))};
%o A350101 a350101(390)
%Y A350101 Cf. A046388.
%Y A350101 Intersection of A234093 and A234096.
%K A350101 nonn
%O A350101 1,1
%A A350101 _Hugo Pfoertner_, Dec 14 2021