login
A296808
Take a squarefree semiprime and take the difference between its prime factors. If this difference is a squarefree semiprime repeat the process. Sequence lists the smallest squarefree semiprime that generates other squarefree semiprimes in the first n steps of this process.
7
6, 34, 82, 226, 687, 4786, 14367, 28738, 373763, 21408927, 158279834, 2690757467, 36906080234
OFFSET
0,1
COMMENTS
a(13) <= 848839845911, a(14) <= 1697679691826, a(15) <= 28860554761331, a(16) <= 57721109522666, a(17) <= 634932204749447. - Daniel Suteu, Jul 09 2019
EXAMPLE
6 = 2*3.
34 = 2*17, 17-2 = 15 = 3*5.
82 = 2*41, 41-2 = 39 = 3*13, 13-3 = 10 = 2*5.
226 = 2*113, 113-2 = 111 = 3*37, 37-3 = 34 = 2*17, 17-2 = 15 = 3*5.
MAPLE
with(numtheory): P:=proc(q) local a, b, j, k, n, ok, x; x:=1; for k from 1 to q do for n from x to q do ok:=1; b:=n; for j from 1 to k do if issqrfree(b) and nops(factorset(b))=2 then b:=ifactors(b)[2]; b:=b[1][1]-b[2][1]; else ok:=0; break; fi; od; if ok=1 then x:=n; print(n); break; fi; od; od; end: P(10^20);
MATHEMATICA
test[i_] := Module[{f}, If[Length[f = FactorInteger[i]] != 2 || f[[1, 2]] + f[[2, 2]] != 2, Return[0], Return[f[[2, 1]] - f[[1, 1]]]]];
A296808[n_] := Module[{d}, SelectFirst[Range[10^6], If[d = test[#]; d == 0, False, AllTrue[Table[If[d = test[d]; d != 0, True, False], n], TrueQ]] &]]
Table[A296808[n], {n, 0, 8}] (* Robert Price, May 25 2019 *)
PROG
(C++) See Links section.
CROSSREFS
KEYWORD
nonn,hard,more
AUTHOR
Paolo P. Lava, Dec 21 2017
EXTENSIONS
a(9)-a(10) from Rémy Sigrist, Jan 10 2018
a(11)-a(12) from Daniel Suteu, Jul 09 2019
STATUS
approved