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.

A125050 a(1) = 1. If a(n) is composite, a(n+1) = 2*a(n)+1; otherwise, a(n+1) = 2*a(n).

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A125049.

Programs

  • 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

Formula

a(n) = floor(c*2^n), where c = 0.6083600446... - Lorenzo Sauras Altuzarra, Jan 01 2023