%I #12 Nov 13 2024 13:53:33
%S 0,0,1,2,2,3,4,5,5,5,6,7,7,8,9,9,9,10,11,12,12,12,13,14,14,14,15,15,
%T 15,16,17,18,18,18,19,19,19,20,21,21,21,22,23,24,24,25,26,27,27,27,28,
%U 28,28,29,29,29,29,29,30,31,31,32,33,34,34,34,35,36,36,36,37,38,38,39,40,41,41,41,42,43,43,43,44,45
%N a(n) is the number of terms in the range of A276087 that are <= n, where A276087(n) = A276086(A276086(n)) [the twofold application of the primorial base exp-function].
%C The number of terms of A377871 that are less than or equal to n.
%H Antti Karttunen, <a href="/A377983/b377983.txt">Table of n, a(n) for n = 0..100000</a>
%F a(n) = Sum_{i=1..n} A377870(i) = Sum_{i=1..n} A359550(i) * A359550(A276085(i)).
%o (PARI)
%o up_to = 10000;
%o A359550(n) = { my(pp); forprime(p=2, , pp = p^p; if(!(n%pp), return(0)); if(pp > n, return(1))); };
%o A276085(n) = { my(f = factor(n)); sum(k=1, #f~, f[k, 2]*prod(i=1,primepi(f[k, 1]-1),prime(i))); };
%o A377870(n) = (isprime(n) || (A359550(n) && A359550(A276085(n))));
%o A377983list(up_to) = { my(v=vector(1+up_to), s=0); v[1] = s = A377870(0); for(n=1,up_to,s += A377870(n); v[1+n] = s); (v); };
%o v377983 = A377983list(up_to);
%o A377983(n) = v377983[1+n];
%Y Partial sums of A377870.
%Y Cf. A276085, A276087, A359550, A377871.
%Y Cf. also A377982.
%K nonn
%O 0,4
%A _Antti Karttunen_, Nov 13 2024