The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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
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, 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, 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 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = A006519(A008864(n)). - Michel Marcus, Nov 24 2013
a(n) = 2^A023512(n). - Michel Marcus, Nov 24 2013
MAPLE
f:= n -> 2^padic:-ordp(ithprime(n)+1, 2):
map(f, [$1..100]); # Robert Israel, Jan 13 2017
MATHEMATICA
a[n_] := 2^IntegerExponent[Prime[n] + 1, 2]; Array[a, 100] (* Amiram Eldar, Jun 04 2022 *)
PROG
(PARI) a(n) = 2^valuation(prime(n)+1, 2); \\ Michel Marcus, Nov 24 2013
(Python)
from sympy import prime
def A068504(n): return (m:=prime(n)+1)&-m # Chai Wah Wu, Jul 09 2022
CROSSREFS
Sequence in context: A026142 A095399 A250718 * A080965 A083703 A066104
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Mar 11 2002
STATUS
approved

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 23 12:41 EDT 2024. Contains 372763 sequences. (Running on oeis4.)