[go: up one dir, main page]

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!)
A023512 Exponent of 2 in prime factorization of prime(n) + 1. 10
0, 2, 1, 3, 2, 1, 1, 2, 3, 1, 5, 1, 1, 2, 4, 1, 2, 1, 2, 3, 1, 4, 2, 1, 1, 1, 3, 2, 1, 1, 7, 2, 1, 2, 1, 3, 1, 2, 3, 1, 2, 1, 6, 1, 1, 3, 2, 5, 2, 1, 1, 4, 1, 2, 1, 3, 1, 4, 1, 1, 2, 1, 2, 3, 1, 1, 2, 1, 2, 1, 1, 3, 4, 1, 2, 7, 1, 1, 1, 1, 2, 1, 4, 1, 3, 2, 1, 1, 1, 4, 2, 5, 3, 2, 2, 3, 1, 1, 2, 1, 2, 1, 2, 1, 2 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
2^a(n) is the largest power of 2 dividing (prime(n)+1).
LINKS
EXAMPLE
a(9)=3 because the 9th prime is 23 and the largest power of 2 dividing 24 is 3.
MAPLE
with(numtheory): a:=proc(n) local div, s, j, c: div:=divisors(1+ithprime(n)): s:=nops(div): for j from 1 to s do if type(simplify(log[2](div[j])), integer)=true then c[j]:=simplify(log[2](div[j])) else c[j]:=0 fi od: max(seq(c[j], j=1..s)) end: seq(a(n), n=1..120); # most probably not the simplest Maple program - Emeric Deutsch, Jul 20 2005
MATHEMATICA
Join[{0}, Table[FactorInteger[Prime[n] + 1][[1]][[2]], {n, 2, 100}]] (* Clark Kimberling, Oct 01 2013 *)
IntegerExponent[Prime[Range[100]] + 1, 2] (* Zak Seidov, Apr 25 2014 *)
PROG
(Magma) [Valuation(NthPrime(n)+1, 2): n in [1..110]]; // Bruno Berselli, Aug 05 2013
(PARI) a(n)=valuation(prime(n)+1, 2);
vector(100, n, a(n)) \\ Joerg Arndt, Mar 11 2014
CROSSREFS
Cf. A239114.
Sequence in context: A255191 A277818 A324607 * A322027 A088192 A218459
KEYWORD
nonn
AUTHOR
EXTENSIONS
Corrected by Yasutoshi Kohmoto, Feb 25 2005
Edited by N. J. A. Sloane, Dec 23 2006
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 August 29 21:34 EDT 2024. Contains 375518 sequences. (Running on oeis4.)