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!)
A352217 Smallest power of 2 that is one more than a multiple of 2n-1. 1
2, 4, 16, 8, 64, 1024, 4096, 16, 256, 262144, 64, 2048, 1048576, 262144, 268435456, 32, 1024, 4096, 68719476736, 4096, 1048576, 16384, 4096, 8388608, 2097152, 256, 4503599627370496, 1048576, 262144, 288230376151711744, 1152921504606846976, 64, 4096 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
Every odd number is a divisor of a number of the form 2^n-1.
LINKS
FORMULA
From Alois P. Heinz, Mar 07 2022: (Start)
a(n) = 2^A002326(n-1).
a(n) = 1 + A165781(n-1)*(2*n-1). (End)
EXAMPLE
a(5)=64 because 63 is the smallest number of the form 2^n-1 that's a multiple of 9.
MAPLE
a:= n-> 2^`if`(n=1, 1, numtheory[order](2, 2*n-1)):
seq(a(n), n=1..50); # Alois P. Heinz, Mar 07 2022
MATHEMATICA
Table[2^MultiplicativeOrder[2, 2*n - 1], {n, 1, 33}] (* Amiram Eldar, Mar 08 2022 *)
PROG
(Python)
def a(n):
if n == 1: return 2
p, m = 2, 2*n-1
while p <= m or p % m != 1: p *= 2
return p
print([a(n) for n in range(1, 34)]) # Michael S. Branicky, Mar 07 2022
(Python)
from sympy import n_order
def a(n): return 2**n_order(2, 2*n-1)
print([a(n) for n in range(1, 34)]) # Michael S. Branicky, Mar 07 2022 after Alois P. Heinz
(PARI) a(n) = 1 << znorder(Mod(2, 2*n-1)); \\ Kevin Ryde, Mar 07 2022
CROSSREFS
Sequence in context: A110005 A019540 A109584 * A186110 A073923 A153666
KEYWORD
nonn,easy
AUTHOR
J. Lowell, Mar 07 2022
EXTENSIONS
a(14) and beyond from Michael S. Branicky, Mar 07 2022
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 April 27 02:24 EDT 2024. Contains 372004 sequences. (Running on oeis4.)