login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A068504 Highest power of 2 dividing prime(n)+1. 2

%I #19 Jul 10 2022 04:03:42

%S 1,4,2,8,4,2,2,4,8,2,32,2,2,4,16,2,4,2,4,8,2,16,4,2,2,2,8,4,2,2,128,4,

%T 2,4,2,8,2,4,8,2,4,2,64,2,2,8,4,32,4,2,2,16,2,4,2,8,2,16,2,2,4,2,4,8,

%U 2,2,4,2,4,2,2,8,16,2,4,128,2,2,2,2,4,2,16,2,8,4,2,2,2,16,4,32,8,4,4,8,2

%N Highest power of 2 dividing prime(n)+1.

%H Robert Israel, <a href="/A068504/b068504.txt">Table of n, a(n) for n = 1..10000</a>

%F a(n) = A006519(A008864(n)). - _Michel Marcus_, Nov 24 2013

%F a(n) = 2^A023512(n). - _Michel Marcus_, Nov 24 2013

%p f:= n -> 2^padic:-ordp(ithprime(n)+1,2):

%p map(f, [$1..100]); # _Robert Israel_, Jan 13 2017

%t a[n_] := 2^IntegerExponent[Prime[n] + 1, 2]; Array[a, 100] (* _Amiram Eldar_, Jun 04 2022 *)

%o (PARI) a(n) = 2^valuation(prime(n)+1, 2); \\ _Michel Marcus_, Nov 24 2013

%o (Python)

%o from sympy import prime

%o def A068504(n): return (m:=prime(n)+1)&-m # _Chai Wah Wu_, Jul 09 2022

%Y Cf. A006519, A008864, A023512.

%K easy,nonn

%O 1,2

%A _Benoit Cloitre_, Mar 11 2002

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 7 21:53 EDT 2024. Contains 372317 sequences. (Running on oeis4.)