A360028 Lexicographically earliest sequence of positive numbers in which no nonempty subsequence of consecutive terms sums to a semiprime.
1, 1, 1, 16, 1, 11, 1, 11, 30, 30, 79, 17, 44, 28, 12, 30, 150, 144, 252, 304, 20, 300, 132, 12, 252, 234, 18, 112, 32, 456, 52, 520, 60, 28, 120, 180, 162, 2, 52, 324, 42, 130, 20, 60, 100, 92, 132, 126, 186, 184, 104, 12, 104, 320, 8, 12, 20, 320, 104, 16, 32, 208, 404, 240, 300, 60, 408
Offset: 0
Keywords
Examples
a(0) = 1 by the definition of the sequence. For the next number we try 1; {1, 1 + 1} are not semiprimes, thus a(1) = 1. For the next number we try 1; {1, 1 + 1, 1 + 1 + 1} are not semiprimes, thus a(2) = 1.
Links
- Thomas Scheuerle, Table of n, a(n) for n = 0..3999
Programs
-
MATLAB
function a = A360028(max_n) a = 1; s = 1; while length(a) < max_n sn = [s+1 1]; while(~isempty(find(arrayfun(@(x)(length(factor(x))),sn)==2, 1))) sn = sn+1; end s = sn; a = [a sn(end)]; end end % Thomas Scheuerle, Jan 22 2023
Comments