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.

A085876 Smallest k such that k and k+n have the same prime signature that is different from all previous terms.

Original entry on oeis.org

2, 18, 35, 66, 4, 84, 344, 1692, 1785, 270, 4293, 1176, 9315, 1458, 3450, 5304, 2656, 10332, 8, 1352, 13344, 73040, 190762, 28812, 128180, 77248, 51948, 43092, 196, 35880, 287469, 85968, 387552, 83072, 412300, 45864, 247131, 549250, 1713855, 714960, 898816, 266448
Offset: 1

Views

Author

Amarnath Murthy, Jul 07 2003

Keywords

Examples

			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.
		

Crossrefs

Cf. A086489.

Programs

  • PARI
    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

Extensions

More terms from Ray Chandler, Jul 11 2003
More terms from Ray Chandler, Jul 13 2003
More terms from Michel Marcus, Sep 23 2023