cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A057024 Largest odd factor of (n-th prime+1); k when n-th prime is written as k*2^m-1 [with k odd].

This page as a plain text file.
%I A057024 #23 Aug 15 2024 07:05:11
%S A057024 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,
%T A057024 27,55,57,1,33,69,35,75,19,79,41,21,87,45,91,3,97,99,25,53,7,57,115,
%U A057024 117,15,121,63,129,33,135,17,139,141,71,147,77,39,157,159,83,169,87
%N A057024 Largest odd factor of (n-th prime+1); k when n-th prime is written as k*2^m-1 [with k odd].
%C A057024 a(n) = 1 if and only if prime(n) is a Mersenne prime. - _Ely Golden_, Feb 06 2017
%H A057024 Ely Golden, <a href="/A057024/b057024.txt">Table of n, a(n) for n = 1..10000</a>
%H A057024 <a href="/index/Pri#riesel">Index entries for sequences of n such that k*2^n-1 (or k*2^n+1) is prime</a>
%F A057024 a(n) = A000265(A000040(n) + 1) = A000265(A028815(n)).
%F A057024 a(n) = (A000040(n) + 1)/A007814(A000040(n) + 1).
%F A057024 a(n) = A028815(n)/A023512(n).
%e A057024 a(5)=3 because 5th prime is 11 and 11=3*2^2-1.
%t A057024 Table[Max[Select[Divisors[Prime[n]+1],OddQ]],{n,100}] (* _Daniel Jolly_, Nov 15 2014 *)
%o A057024 (Sage) def a(n):
%o A057024     x=nth_prime(n)+1
%o A057024     return x/2**((int(x)&int(-x)).bit_length()-1)
%o A057024 index=1
%o A057024 while(index<=10000):
%o A057024     print(str(index)+" "+str(a(index)))
%o A057024     index+=1
%o A057024 # _Ely Golden_, Feb 06 2017
%o A057024 (PARI) a(n) = (prime(n)+1)/2^valuation(prime(n)+1, 2); \\ _Michel Marcus_, Feb 05 2017
%o A057024 (Magma)
%o A057024 A057024:= func< n | (NthPrime(n)+1)/2^Valuation(NthPrime(n)+1, 2) >;
%o A057024 [A057024(n): n in [1..100]]; // _G. C. Greubel_, Aug 06 2024
%Y A057024 Cf. A000040, A000265, A007814, A023512, A028815, A057023.
%K A057024 nonn,easy
%O A057024 1,1
%A A057024 _Henry Bottomley_, Jul 24 2000