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.

A301868 Numbers k such that phi(k, 2) = phi(k+1, 2), where phi(k, 2) = A002472(k).

Original entry on oeis.org

1, 2, 9, 34, 50, 153, 274, 321, 2841, 4610, 7474, 8254, 10250, 13430, 22149, 38961, 51981, 86845, 91310, 198057, 237325, 367629, 374541, 394834, 419169, 489445, 513890, 516350, 519230, 570230, 717969, 1308609, 1523630, 1557909, 1753730, 1935362, 2109969, 3005409
Offset: 1

Views

Author

Amiram Eldar, Mar 28 2018

Keywords

Examples

			phi(9, 2) = phi(10, 2) = 3, thus 9 is in the sequence.
		

Crossrefs

Cf. A002472.

Programs

  • Mathematica
    seq = {}; a[n_] := If[Head[r = Reduce[GCD[x, n] == 1 && GCD[x + 2, n] == 1 && 1 <= x <= n, x, Integers]] === Or, Length[r], 1]; a0 = a[1]; Do[
    a1 = a[k + 1]; If[a1 == a0, AppendTo[seq, k]]; a0 = a1, {k, 1, 1000}]; seq (* after Jean-François Alcover at A002472 *)
  • PARI
    f(n) = sum(x=1, n, (gcd(n, x) == 1) && (gcd(n, x+2) == 1));
    isok(n) = f(n) == f(n+1); \\ Michel Marcus, Apr 09 2018

Extensions

a(20)-a(29) from Robert Price, May 18 2018
More terms from Amiram Eldar, Mar 26 2023