Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
a(n) = number of primes <= !n, where !n is subfactorial n.
2

%I #11 Aug 25 2020 04:25:37

%S 0,0,1,4,14,56,283,1738,12457,102492,951651,9830851,111757480,

%T 1385739200,18604785172,268807211509,4157797131788,68538901559776,

%U 1199382039260721,22203590239217092,433511971123048194,8902234772796777434,191798011804919907012

%N a(n) = number of primes <= !n, where !n is subfactorial n.

%H Kim Walisch, <a href="https://github.com/kimwalisch/primecount">Fast C++ prime counting function implementation (primecount)</a>.

%F a(n) = A000720(A000166(n)). - _Jens Kruse Andersen_, Jul 18 2014

%e a(5) = 14, because !5 = 44 and the number of primes up to 44 is 14.

%Y Cf. A000720, A000166.

%K hard,nonn

%O 1,4

%A _Shyam Sunder Gupta_, Feb 11 2007

%E a(17)-a(20) from _Jens Kruse Andersen_, Jul 18 2014

%E a(21)-a(23) using Kim Walisch's primecount, from _Amiram Eldar_, Aug 25 2020