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!)
A125050 a(1) = 1. If a(n) is composite, a(n+1) = 2*a(n)+1; otherwise, a(n+1) = 2*a(n). 2
1, 2, 4, 9, 19, 38, 77, 155, 311, 622, 1245, 2491, 4983, 9967, 19934, 39869, 79738, 159477, 318955, 637911, 1275823, 2551646, 5103293, 10206587, 20413175, 40826351, 81652702, 163305405, 326610811, 653221623, 1306443247, 2612886495 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
LINKS
FORMULA
a(n) = floor(c*2^n), where c = 0.6083600446... - Lorenzo Sauras Altuzarra, Jan 01 2023
MAPLE
a := proc(n)
local c, k:
c, k := 1, 1:
while c < n do
if k > 1 and not isprime(k) then k := 2*k+1: else k := 2*k: fi:
c := c+1: od:
k: end: # Lorenzo Sauras Altuzarra, Jan 02 2023
CROSSREFS
Cf. A125049.
Sequence in context: A262864 A129784 A329356 * A056186 A265387 A293322
KEYWORD
nonn
AUTHOR
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 24 08:13 EDT 2024. Contains 371922 sequences. (Running on oeis4.)