login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Indices of primes in A283312.
3

%I #16 Jan 30 2024 11:42:21

%S 2,4,6,8,12,15,19,22,26,32,35,41,45,48,52,59,65,68,74,79,82,88,92,98,

%T 106,111,114,118,121,126,139,144,150,153,162,165,172,178,182,189,195,

%U 198,209,212,216,219,230,241,245,248,253,260,263,274,280,286,293,296,302,306,309,320,333

%N Indices of primes in A283312.

%H N. J. A. Sloane, <a href="/A338361/b338361.txt">Table of n, a(n) for n = 1..7099</a>

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

%p with(NumberTheory);

%p A338361 := n -> ithprime(n)+n-1-pi(ithprime(n)/2);

%t A338361[n_] := Prime[n] - PrimePi[Prime[n]/2] + n - 1;

%t Array[A338361, 100] (* _Paolo Xausa_, Jan 30 2024 *)

%Y Cf. A000720, A283312.

%K nonn

%O 1,1

%A _N. J. A. Sloane_, Nov 03 2020