login
A135257
Smallest semiprimes such that a(j) - a(k) are all different.
1
4, 6, 9, 10, 21, 34, 55, 65, 74, 94, 141, 177, 203, 219, 298, 321, 395, 403, 529, 581, 635, 662, 731, 934, 982, 1073, 1145, 1317, 1418, 1762, 1769, 1849, 1915, 2066, 2165, 2305, 2327, 2746, 2809, 3127, 3409, 3859, 3983, 4138, 4285, 4559, 4742, 5186, 5299, 5854
OFFSET
1,1
COMMENTS
Semiprime analog of A079848. This is the slowest-growing semiprime B2 sequence (see A005282). The difference set through a(n) must have cardinality exactly C(n,2) = n*(n+1)/2 = A000217(n-1).
EXAMPLE
a(1) = 4, the smallest semiprime (A001358(1)).
a(2) = 6 = A001358(2); the difference set so far is {2}.
a(3) = 9 = A001358(3); the difference set so far is {2,3,5}.
a(4) = 10 = A001358(4); the difference set so far is {1,2,3,4,5,6}.
a(5) can't be 14 = A001358(5) because 14-10 =4, in the difference set through a(4); can't be 15 = A001358(6) because 15-10 =5, in the difference set through a(4)...
a(5) = 21 = A001358(7); the difference set so far is {1,2,3,4,5,6,11,12,15,17}.
a(6) = 34 = A001358(12); the difference set so far is {1,2,3,4,5,6,11,12,13,15,17,24,25,28,30}.
MAPLE
A135257 := proc(nmax) local a, anext, diffset, good, an ; a := [4, 6] ; diffset := {2} ; while nops(a) < nmax do for anext from op(-1, a)+1 do if numtheory[bigomega](anext) = 2 then good := true ; for an in a do if ( anext-an) in diffset then good := false ; break ; fi ; od; if good then for an from 1 to nops(a) do diffset := diffset union { anext-op(an, a) } ; od; a := [op(a), anext] ; break ; fi ; fi ; od ; od: a ; end: A135257(60) ; # R. J. Mathar, Jan 08 2008
PROG
(Python)
from itertools import count, islice
from sympy import factorint
def A135257_gen(): # generator of terms
aset2, alist = set(), []
for k in count(0):
if sum(factorint(k).values()) == 2:
bset2 = set()
for a in alist:
if (b:=k-a) in aset2:
break
bset2.add(b)
else:
yield k
alist.append(k)
aset2.update(bset2)
A135257_list = list(islice(A135257_gen(), 30)) # Chai Wah Wu, Sep 11 2023
CROSSREFS
KEYWORD
nonn
AUTHOR
Jonathan Vos Post, Dec 01 2007
EXTENSIONS
Corrected and extended by R. J. Mathar, Jan 08 2008
STATUS
approved