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.
%I A302778 #23 Feb 19 2025 12:34:37 %S A302778 0,1,2,3,4,4,5,5,6,6,7,7,8,8,8,9,10,10,11,11,11,11,12,12,13,13,13,13, %T A302778 14,14,15,15,15,15,15,15,16,16,16,16,17,17,18,18,18,18,19,19,20,20,20, %U A302778 20,21,21,21,21,21,21,22,22,23,23,23,23,23,23,24,24,24,24,25,25,26,26,26,26,26,26,27,27,28,28,29,29,29,29,29,29,30 %N A302778 Number of "Fermi-Dirac primes" (A050376) <= n. %H A302778 Antti Karttunen, <a href="/A302778/b302778.txt">Table of n, a(n) for n = 1..65537</a> %F A302778 a(1) = 0; for n > 1, a(n) = A302777(n) + a(n-1). %F A302778 For all n >= 1, a(A050376(n)) = n. %t A302778 s[n_] := Boole[n > 1 && Length[(f = FactorInteger[n])] == 1 && (e = f[[;; , 2]]) == 2^IntegerExponent[e, 2]]; Accumulate @ Array[s, 100] (* _Amiram Eldar_, Nov 27 2020 *) %o A302778 (PARI) %o A302778 A209229(n) = (n && !bitand(n,n-1)); %o A302778 A302777(n) = A209229(isprimepower(n)); %o A302778 s=0; for(n=1,105,s+=A302777(n); print1(s,", ")); %o A302778 (Python) %o A302778 from sympy import primepi, integer_nthroot %o A302778 def A302778(n): return sum(primepi(integer_nthroot(n,1<<i)[0]) for i in range(n.bit_length().bit_length())) # _Chai Wah Wu_, Feb 18-19 2025 %Y A302778 Partial sums of A302777. A left inverse of A050376. %Y A302778 Cf. A302785, A302786. %Y A302778 Differs from A203967 for the first time at n=64, where a(64) = 23, while A203967(64) = 24. %Y A302778 Cf. also A000720, A025528. %K A302778 nonn %O A302778 1,3 %A A302778 _Antti Karttunen_, Apr 16 2018