OFFSET
1,2
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
FORMULA
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
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, Mar 11 2002
STATUS
approved