login
a(n) = 1 if there are no prime factors p of n for which the 2-adic valuation of p-1 is less than that of n-1, otherwise 0.
4

%I #10 Feb 11 2023 11:22:51

%S 1,1,1,1,0,1,1,1,0,1,0,1,0,0,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,0,0,

%T 0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,1,1,1,0,1,0,1,

%U 0,1,0,1,0,0,0,1,0,1,0,1,0,1,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,0,0,0,1,0,0,0,1

%N a(n) = 1 if there are no prime factors p of n for which the 2-adic valuation of p-1 is less than that of n-1, otherwise 0.

%C a(n) = 1 if for all prime factors p of n A007814(p-1) >= A007814(n-1), otherwise 0.

%H Antti Karttunen, <a href="/A360116/b360116.txt">Table of n, a(n) for n = 2..100000</a>

%H <a href="/index/Ch#char_fns">Index entries for characteristic functions</a>

%F a(n) = [A360115(n) = 0], where [ ] is the Iverson bracket.

%t a[n_] := Module[{v = IntegerExponent[n - 1, 2]}, If[AllTrue[FactorInteger[n][[;; , 1]], IntegerExponent[# - 1, 2] <= v &], 1, 0]]; Array[a, 100, 2] (* _Amiram Eldar_, Feb 10 2023 *)

%o (PARI) A360116(n) = { my(f=factor(n), v=valuation(n-1, 2)); !sum(i=1, #f~, (v < valuation(f[i, 1]-1, 2))); };

%Y Characteristic function of A360117.

%Y Cf. A360113, A360115.

%K nonn

%O 2

%A _Antti Karttunen_, Feb 10 2023