login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A362721 Number of numbers k, 1 <= k <= n, such that pi(k) = pi(n-k+1). 1

%I #9 May 02 2023 23:57:49

%S 1,0,1,0,1,2,1,0,1,2,1,0,1,2,3,4,3,2,1,0,1,2,1,0,1,2,3,4,3,2,1,0,1,2,

%T 1,0,1,2,3,4,3,2,1,0,1,2,3,4,5,6,5,4,3,2,1,0,1,2,1,0,1,2,3,4,5,6,5,4,

%U 3,2,1,0,1,2,3,4,3,2,1,0,1,2,1,0,1,2,3,4,3,2,1,0,1,2,3

%N Number of numbers k, 1 <= k <= n, such that pi(k) = pi(n-k+1).

%F a(n) = Sum_{k=1..n} [pi(k) = pi(n-k+1)], where pi is the prime counting function (A000720) and [ ] is the Iverson bracket.

%e There are two cases for a(6) due to symmetry, namely k=3: pi(3) = 2 = pi(6-3+1) and k=4: pi(4) = 2 = pi(6-4+1).

%t Table[Sum[KroneckerDelta[PrimePi[n - k + 1], PrimePi[k]], {k, n}], {n, 100}]

%o (PARI) a(n) = sum(k=1, n, primepi(k) == primepi(n-k+1)); \\ _Michel Marcus_, May 01 2023

%Y Cf. A000720.

%K nonn,easy

%O 1,6

%A _Wesley Ivan Hurt_, Apr 30 2023

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 15 19:46 EDT 2024. Contains 375954 sequences. (Running on oeis4.)