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.

A377937 Number of primes in the interval [n - A000005(n), n + A000005(n)].

This page as a plain text file.
%I A377937 #20 Nov 13 2024 16:36:39
%S A377937 1,2,3,4,3,4,2,3,2,3,2,4,2,3,4,4,2,4,2,3,3,2,1,5,1,2,3,3,2,4,2,3,3,2,
%T A377937 2,5,1,2,3,4,2,4,2,3,3,2,1,4,1,2,2,2,1,4,2,3,3,2,2,5,2,2,3,4,2,5,1,3,
%U A377937 3,3,2,6,2,2,3,3,2,4,1,5,2,2,1,4,2,2,2,2,1,5,1,2,2,1,1,5
%N A377937 Number of primes in the interval [n - A000005(n), n + A000005(n)].
%F A377937 a(n) = pi(n+tau(n)) - pi(n-tau(n)-1).
%e A377937 n = 1, there is one prime in [0, 2], thus a(1) = 1.
%e A377937 n = 6, there are four primes in [2, 10], thus a(6) = 4.
%t A377937 a[n_] := Module[{d = DivisorSigma[0, n]}, PrimePi[n + d] - PrimePi[n - d - 1]]; Array[a, 100] (* _Amiram Eldar_, Nov 11 2024 *)
%Y A377937 Cf. A000005, A000040, A000720, A049820, A062249.
%K A377937 nonn
%O A377937 1,2
%A A377937 _Ctibor O. Zizka_, Nov 11 2024