A087317 Duplicate of A086489.
2, 3, 2, 3, 2, 5, 14, 3, 2, 3, 2, 5, 21, 3, 2, 3, 2, 5, 8, 3, 2, 7, 10, 5, 10, 3, 2, 3, 2, 7, 15, 5, 6
Offset: 1
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.
a(3, 2) = 3 because 3, 5 and 7 have the same prime signature.
a(1) = 2, as 2 and 2+1 = 3 both are primes. a(2) = 18, 18 and 18+2 = 20 have the prime signature p^2*q. a(4) = 66 as 66 + 4 = 70, both have prime signature p*q*r which has not occurred earlier. a(19) = 8 as 8+19 = 27 and 8 and 27 have the same prime signature p^3.
used = vector(42); ps(n) = local(f); f = factor(n); vecsort(f[,2]); a(n) = local(P, m, v, found, j); P = vector(n, i, ps(i)); m = 1; while (1, for (i = 1, n, v = ps(m*n + i); if (v == P[i], found = 0; j = 1; while (!found && j < n, if (v == used[j], found = 1, j++)); if (!found, used[n] = v; return((m - 1)*n + i))); P[i] = v); m++); for (i = 1, 42, print1(a(i), ", ")); \\ David Wasserman, Jul 19 2005
Comments