%I #11 Feb 23 2019 07:22:49
%S 1,1,1,1,1,0,1,1,1,0,1,0,1,0,0,1,1,0,1,0,0,0,1,0,1,0,1,0,1,0,1,1,0,0,
%T 0,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,0,0,0,0,1,0,1,0,0,1,0,0,1,0,
%U 0,0,1,0,1,0,0,0,0,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,1,0,1,0,0,0,1,0,0,0,0,0,0,0,1
%N a(n) = 1 if for every prime divisor p of n, p-1 divides n-1, 0 otherwise; characteristic function of A087441.
%C Function c1(n) = A008966(n)*a(n) is the characteristic function of A324050.
%C Function c2(n) = A008966(n)*a(n) - A080339(n) is the characteristic function of Carmichael numbers, A002997.
%C Function c3(n) = a(n) - A010055(n) is the characteristic function of A087442.
%H Antti Karttunen, <a href="/A324290/b324290.txt">Table of n, a(n) for n = 1..101101</a>
%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>
%F a(n) >= A010055(n) >= A010051(n) for all n.
%o (PARI) A324290(n) = if(1==n,1, my(f=factor(n)); for(i=1, #f[, 1], if((n-1)%(f[i, 1]-1), return(0))); (1));
%Y Cf. A002997, A008966, A010051, A010055, A080339, A087441, A087442, A324050, A324053.
%K nonn
%O 1
%A _Antti Karttunen_, Feb 22 2019