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!)
A057024 Largest odd factor of (n-th prime+1); k when n-th prime is written as k*2^m-1 [with k odd]. 3
3, 1, 3, 1, 3, 7, 9, 5, 3, 15, 1, 19, 21, 11, 3, 27, 15, 31, 17, 9, 37, 5, 21, 45, 49, 51, 13, 27, 55, 57, 1, 33, 69, 35, 75, 19, 79, 41, 21, 87, 45, 91, 3, 97, 99, 25, 53, 7, 57, 115, 117, 15, 121, 63, 129, 33, 135, 17, 139, 141, 71, 147, 77, 39, 157, 159, 83, 169, 87 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
a(n) = 1 if and only if prime(n) is a Mersenne prime. - Ely Golden, Feb 06 2017
LINKS
FORMULA
a(n) = A000265(A000040(n) + 1)) = A000265(A028815(n)).
a(n) = (A000040(n) + 1)/A007814(A000040(n) + 1).
a(n) = A028815(n)/A023512(n).
EXAMPLE
a(5)=3 because 5th prime is 11 and 11=3*2^2-1.
MATHEMATICA
Table[Max[Select[Divisors[Prime[n]+1], OddQ]], {n, 100}] (* Daniel Jolly, Nov 15 2014 *)
PROG
(Sage) def a(n):
x=nth_prime(n)+1
return x/2**((int(x)&int(-x)).bit_length()-1)
index=1
while(index<=10000):
print(str(index)+" "+str(a(index)))
index+=1
# Ely Golden, Feb 06 2017
(PARI) a(n) = (prime(n)+1)/2^valuation(prime(n)+1, 2); \\ Michel Marcus, Feb 05 2017
(Magma)
A057024:= func< n | (NthPrime(n)+1)/2^Valuation(NthPrime(n)+1, 2) >;
[A057024(n): n in [1..100]]; // G. C. Greubel, Aug 06 2024
CROSSREFS
Sequence in context: A035628 A187562 A370719 * A023892 A085417 A201662
KEYWORD
nonn,changed
AUTHOR
Henry Bottomley, Jul 24 2000
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 12 04:33 EDT 2024. Contains 375085 sequences. (Running on oeis4.)