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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,6
LINKS
FORMULA
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.
EXAMPLE
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).
MATHEMATICA
Table[Sum[KroneckerDelta[PrimePi[n - k + 1], PrimePi[k]], {k, n}], {n, 100}]
PROG
(PARI) a(n) = sum(k=1, n, primepi(k) == primepi(n-k+1)); \\ Michel Marcus, May 01 2023
CROSSREFS
Cf. A000720.
Sequence in context: A065368 A010751 A194523 * A180714 A170959 A170960
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 30 2023
STATUS
approved

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 August 12 09:35 EDT 2024. Contains 375092 sequences. (Running on oeis4.)