A346549 Runs (of length > 1) of consecutive squarefree semiprimes.
14, 15, 21, 22, 33, 34, 35, 38, 39, 57, 58, 85, 86, 87, 93, 94, 95, 118, 119, 122, 123, 133, 134, 141, 142, 143, 145, 146, 158, 159, 177, 178, 201, 202, 203, 205, 206, 213, 214, 215, 217, 218, 219, 253, 254, 298, 299, 301, 302, 303, 326, 327, 334, 335, 381, 382, 393, 394, 395, 445, 446, 447, 453, 454, 481, 482
Offset: 1
Keywords
Examples
14 and 15 are consecutive and both have prime signature {1, 1}
Links
- Wikipedia, Prime signature
Programs
-
Mathematica
s = Union@ Flatten@ Table[Prime[m] Prime[n], {n, Log2[#/3]}, {m, n + 1, PrimePi[#/Prime[n]]}] &[482]; s[[Flatten@ Map[Append[#, Last[#] + 1] &, Position[Differences[s], 1]]]] (* Michael De Vlieger, Oct 28 2021 *) With[{sp=If[SquareFreeQ[#]&&PrimeOmega[#]==2,1,0]&/@Range[ 500]},DeleteDuplicates[ Flatten[SequencePosition[sp,{1,1}]]]] (* Harvey P. Dale, Jul 29 2022 *)
-
PARI
consecutive(n)=my(f=vecsort(factor(n)[, 2])); f==vecsort(factor(n-1)[, 2]) || f==vecsort(factor(n+1)[, 2]) \\ based on A260143 squarefree_semiprime(n)=(bigomega(n)==2&&omega(n)==2) \\ based on A006881 for(n=1, 500, if(squarefree_semiprime(n) && consecutive(n), print1(n, ", ")))
-
Python
from sympy import factorint def aupto(limit): aset, prevsig = set(), [1] for k in range(3, limit+2): sig = sorted(factorint(k).values()) if sig == prevsig == [1, 1]: aset.update([k - 1, k]) prevsig = sig return sorted(aset) print(aupto(482)) # Michael S. Branicky, Sep 20 2021
Comments