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.

Showing 1-1 of 1 results.

A226833 Triangle whose n-th row has the smallest n semiprimes in an arithmetic progression.

Original entry on oeis.org

4, 4, 6, 6, 10, 14, 10, 22, 34, 46, 10, 22, 34, 46, 58, 201, 205, 209, 213, 217, 221, 133, 185, 237, 289, 341, 393, 445, 133, 185, 237, 289, 341, 393, 445, 497, 635, 707, 779, 851, 923, 995, 1067, 1139, 1211, 697, 793, 889, 985, 1081, 1177, 1273, 1369, 1465, 1561
Offset: 1

Views

Author

T. D. Noe, Jun 28 2013

Keywords

Comments

The largest term of each row is as small as possible. Although Nowicki reports on the 28th row of this triangle, those terms are too large. Sequence A096003 reports the largest terms.

Examples

			Triangle:
4,
4,   6,
6,   10,  14,
10,  22,  34,  46,
10,  22,  34,  46,  58,
201, 205, 209, 213, 217,  221,
133, 185, 237, 289, 341,  393,  445,
133, 185, 237, 289, 341,  393,  445,  497,
635, 707, 779, 851, 923,  995,  1067, 1139, 1211,
697, 793, 889, 985, 1081, 1177, 1273, 1369, 1465, 1561
		

Crossrefs

Cf. A226834 (first term), A096003 (last term), A097824 (gaps).

Programs

  • Mathematica
    SemiPrimeQ[n_Integer] := If[Abs[n] < 2, False, (2 == Plus @@ Transpose[FactorInteger[Abs[n]]][[2]])]; p2 = Select[Range[2000], SemiPrimeQ]; nn = Length[p2]; t = {}; n = 0; last = 1; While[n++; found = False; last = n; While[k = last - 1; While[d = p2[[last]] - p2[[k]]; nums = Table[p2[[last]] - i*d, {i, 0, n - 1}]; int = Intersection[nums, Take[p2, last]]; nums[[-1]] > 0 && Length[int] < n, k--]; nums[[-1]] <= 0 && last < nn, last++]; If[last < nn, AppendTo[t, Reverse[nums]]]; last < nn]; t
Showing 1-1 of 1 results.