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.

A250222 a(n) = phi(2n+1) - phi(2n), where phi is A000010.

Original entry on oeis.org

1, 2, 4, 2, 6, 8, 2, 8, 12, 4, 12, 12, 6, 16, 22, 4, 8, 24, 6, 24, 30, 4, 24, 26, 12, 28, 22, 12, 30, 44, 6, 16, 46, 12, 46, 48, 4, 24, 54, 22, 42, 40, 14, 48, 48, 16, 26, 64, 18, 60, 70, 0, 54, 72, 32, 64, 52, 16, 38, 78, 20, 40, 90, 20, 82, 68, 6, 72, 94, 44, 50, 64
Offset: 1

Views

Author

Eric Chen, Dec 24 2014

Keywords

Comments

a(157) = -12 is the first negative number in this sequence.

Crossrefs

Programs

  • Mathematica
    a[n_] := EulerPhi[2*n+1] - EulerPhi[2*n]; Array[a, 100] (* Amiram Eldar, Nov 09 2024 *)
    #[[2]]-#[[1]]&/@Partition[EulerPhi[Range[2,150]],2] (* Harvey P. Dale, Aug 02 2025 *)
  • PARI
    a(n) = eulerphi(2*n+1) - eulerphi(2*n); \\ Amiram Eldar, Nov 09 2024

Formula

From Amiram Eldar, Nov 09 2024: (Start)
a(n) = A057000(2*n).
a(n) = A037225(n) - A062570(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = 4/Pi^2 = 0.405284... (A185199). (End)