%I #22 Apr 05 2022 17:07:48
%S 1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,0,1,0,1,1,1,1,1,0,0,1,0,1,1,0,1,0,1,1,
%T 0,0,1,1,1,0,1,0,1,1,0,1,1,0,0,0,1,1,1,0,0,1,1,1,1,0,1,1,0,0,0,1,1,1,
%U 1,0,1,0,1,1,0,1,0,1,1,0,0,1,1,0,0,1,1,1,1,0,0,1,1,1,0,0,1,0,0,0,1,1,1,1,0,1,1,0,1,0,1,0,1,1,0
%N a(n) = 1 if either n = 1 or the primorial inflation of n is equal to k * p#, where p# is the primorial (A034386) of some prime p, and 1 <= k < p, otherwise 0.
%C a(n) = 1 if A108951(n) is in A060735, 0 otherwise.
%C a(n) = 1 if A324886(n) is a power of prime (in A000961) and 0 otherwise.
%C When a(n) = 1 for any n > 1, then by necessity, prime p mentioned in the definition is A000040(1+A061395(n)), that is, the next prime larger than the greatest prime dividing n, A006530(n). Therefore, a(n) = 1 when A108951(n) / A002110(A061395(n)) < A000040(1+A061395(n)).
%H Antti Karttunen, <a href="/A351956/b351956.txt">Table of n, a(n) for n = 1..65537</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%H <a href="/index/Pri#primorialbase">Index entries for sequences related to primorial base</a>
%H <a href="/index/Pri#primorial_numbers">Index entries for sequences related to primorial numbers</a>
%F a(n) = A010055(A324886(n)).
%F a(n) = 1 if A329040(n) = 1, and 0 otherwise.
%F For n > 1, A010051(n) = a(n) * A351957(n).
%o (PARI)
%o A034386(n) = prod(i=1, primepi(n), prime(i));
%o A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A034386(f[i, 1])^f[i, 2]) }; \\ From A108951
%o A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
%o A324886(n) = A276086(A108951(n));
%o A351956(n) = (!!isprimepower(A324886(n)));
%o (PARI)
%o \\ A faster program:
%o A002110(n) = prod(i=1,n,prime(i));
%o A108951(n) = { my(f=factor(n)); prod(i=1, #f~, A002110(primepi(f[i, 1]))^f[i, 2]) };
%o A061395(n) = if(n>1, primepi(vecmax(factor(n)[, 1])), 0);
%o A351956(n) = if(1==n,1,my(gpfi=A061395(n)); (A108951(n)/A002110(gpfi)<prime(1+gpfi)));
%Y Characteristic function of A351958.
%Y Cf. A000040, A000961, A002110, A006530, A010055, A034386, A060735, A108951, A276086, A324886, A329040.
%Y Cf. A010051, A351957.
%K nonn
%O 1
%A _Antti Karttunen_, Apr 04 2022