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.

A338361 Indices of primes in A283312.

Original entry on oeis.org

2, 4, 6, 8, 12, 15, 19, 22, 26, 32, 35, 41, 45, 48, 52, 59, 65, 68, 74, 79, 82, 88, 92, 98, 106, 111, 114, 118, 121, 126, 139, 144, 150, 153, 162, 165, 172, 178, 182, 189, 195, 198, 209, 212, 216, 219, 230, 241, 245, 248, 253, 260, 263, 274, 280, 286, 293, 296, 302, 306, 309, 320, 333
Offset: 1

Views

Author

N. J. A. Sloane, Nov 03 2020

Keywords

Crossrefs

Programs

  • Maple
    with(NumberTheory);
    A338361 := n -> ithprime(n)+n-1-pi(ithprime(n)/2);
  • Mathematica
    A338361[n_] := Prime[n] - PrimePi[Prime[n]/2] + n - 1;
    Array[A338361, 100] (* Paolo Xausa, Jan 30 2024 *)

Formula

a(n) = p(n) + n - 1 - pi(p(n)/2), where p(n) = prime(n) and pi(i) = A000720(i).