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).

This page as a plain text file.
%I A125050 #17 Jan 22 2023 16:34:57
%S A125050 1,2,4,9,19,38,77,155,311,622,1245,2491,4983,9967,19934,39869,79738,
%T A125050 159477,318955,637911,1275823,2551646,5103293,10206587,20413175,
%U A125050 40826351,81652702,163305405,326610811,653221623,1306443247,2612886495
%N A125050 a(1) = 1. If a(n) is composite, a(n+1) = 2*a(n)+1; otherwise, a(n+1) = 2*a(n).
%F A125050 a(n) = floor(c*2^n), where c = 0.6083600446... - _Lorenzo Sauras Altuzarra_, Jan 01 2023
%p A125050 a := proc(n)
%p A125050    local c, k:
%p A125050    c, k := 1, 1:
%p A125050    while c < n do
%p A125050       if k > 1 and not isprime(k) then k := 2*k+1: else k := 2*k: fi:
%p A125050       c := c+1: od:
%p A125050    k: end: # Lorenzo Sauras Altuzarra, Jan 02 2023
%Y A125050 Cf. A125049.
%K A125050 nonn
%O A125050 1,2
%A A125050 _Franklin T. Adams-Watters_, Nov 17 2006