%I #11 Feb 11 2023 11:22:45
%S 0,0,0,0,1,0,0,0,1,0,1,0,1,1,0,0,1,0,1,0,1,0,1,0,1,0,1,0,2,0,0,0,1,1,
%T 1,0,1,1,1,0,2,0,1,0,1,0,1,0,1,1,1,0,1,1,1,0,1,0,2,0,1,0,0,0,2,0,1,0,
%U 2,0,1,0,1,1,1,0,2,0,1,0,1,0,2,1,1,1,1,0,2,1,1,0,1,1,1,0,1,0,1,0,2,0,1,0,1,0,1,0,2,1,1,0,2,1,1,0,1,1,2,0
%N Number of prime factors p of n for which the 2-adic valuation of p-1 is greater than that of n-1.
%H Antti Karttunen, <a href="/A360115/b360115.txt">Table of n, a(n) for n = 2..100000</a>
%e For n = 6 = 2*3, A007814(6-1) = 0, A007814(2-1) = 0 and A007814(3-1) = 1, therefore there is one prime factor (3) which satisfies the condition, and a(6) = 1.
%e For n = 85 = 5*17, A007814(85-1) = 2, A007814(5-1) = 2 and A007814(17-1) = 4, therefore there is one prime factor (17) which satisfies the condition, and a(85) = 1.
%e For n = 195 = 3*5*13, A007814(195-1) = 1, A007814(3-1) = 1, A007814(5-1) = A007814(13-1) = 2, therefore there are two prime factors (5 and 13) that satisfy the condition, and a(195) = 2.
%t a[n_] := Module[{v = IntegerExponent[n - 1, 2]}, Count[FactorInteger[n][[;; , 1]], _?(IntegerExponent[# - 1, 2] > v &)]]; Array[a, 100, 2] (* _Amiram Eldar_, Feb 10 2023 *)
%o (PARI) A360115(n) = { my(f=factor(n), v=valuation(n-1, 2)); sum(i=1, #f~, (v < valuation(f[i, 1]-1, 2))); };
%Y Cf. A360116, A360117 (positions of 0's).
%K nonn
%O 2,29
%A _Antti Karttunen_, Feb 10 2023