%I #28 Sep 08 2022 08:44:47
%S 1,2,3,1,1,4,2,1,2,1,1,3,2,1,3,1,6,2,1,2,4,1,1,1,2,3,1,1,2,7,1,3,1,2,
%T 1,5,2,1,4,1,2,1,1,2,4,2,5,1,1,2,1,3,1,2,1,2,1,1,3,1,4,2,1,1,3,1,3,1,
%U 1,2,2,1,3,2,1,1,1,1,5,1,2,1,2,3,1,1,1,2,4,2,2,3,4,2,1,1,3
%N Exponent of 2 in prime factorization of prime(n) - 3.
%H Robert Israel, <a href="/A023572/b023572.txt">Table of n, a(n) for n = 3..10000</a>
%p seq(padic:-ordp(ithprime(n)-3,2), n=3..100); # _Robert Israel_, Aug 21 2018
%t Table[IntegerExponent[Prime[n]-3, 2], {n, 3, 100}] (* _Jean-François Alcover_, Jun 03 2019 *)
%o (PARI) twos(n) = if(n%2==1||n<1,0,twos(n/2)+1)
%o A023572(n) = twos(prime(n)-3)
%o (PARI) a(n) = valuation(prime(n)-3, 2); \\ _Michel Marcus_, Aug 21 2018
%o (Magma) [Valuation(NthPrime(n) - 3, 2): n in [3..100]]; // _Vincenzo Librandi_, Aug 21 2018
%o (Sage) [valuation(p-3, 2) for p in primes(5, 555)] # _Peter Luschny_, Aug 21 2018
%K nonn
%O 3,2
%A _Clark Kimberling_
%E Offset set to 3 following a suggestion of R. J. Mathar, _Peter Luschny_, Aug 21 2018