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.

Showing 1-2 of 2 results.

A109734 In A109732, the number 2n+1 appears in position a(n).

Original entry on oeis.org

1, 2, 5, 3, 30, 6, 28, 4, 38, 26, 11, 7, 36, 29, 14, 8, 201, 39, 34, 27, 180, 12, 175, 9, 199, 37, 46, 31, 25, 15, 178, 10, 242, 202, 49, 40, 197, 35, 54, 32, 192, 158, 23, 13, 208, 176, 57, 16, 240, 200, 61, 41, 83, 47, 195, 33, 121, 42, 67, 17, 190, 179, 70, 18, 689, 243
Offset: 0

Views

Author

N. J. A. Sloane, Aug 10 2005

Keywords

Examples

			9 appears in position 30 in A109732, so a(4) = 30.
		

Crossrefs

Cf. A109732. For records see A109739 and A109740.

Programs

  • Maple
    with(LinearAlgebra);
    hit:=Array(1..200000); a:=[1,3,7];
    hit[1]:=1; hit[3]:=2; hit[7]:=3; S:={15}; L:=7;
    for n from 4 to 20000 do
    if (L mod 3 = 0) and hit[L/3]=0 then
    L:=L/3; a:=[op(a),L]; hit[L]:=n; S:= S minus {L};
       if hit[2*L+1]=0 then S:=S union {2*L+1}; fi;
    else L:=min(S); a:=[op(a),L]; hit[L]:=n; S:=S minus {L};
       if hit[2*L+1]=0 then S:=S union {2*L+1}; fi;
    fi;
    od:
    #a;
    w:=[];
    for i from 0 to 50000 do
    if hit[2*i+1]=0 then break; fi;
    w:=[op(w),hit[2*i+1]]; od:
    w; # N. J. A. Sloane, Aug 25 2015
  • Mathematica
    (* using the M generated in A109732 *) ms=Sort[M]; k=1; While[ms[[k]]==2k-1, k++ ]; k=k-1; Take[Ordering[M], k] (* T. D. Noe, Aug 10 2005 *)

Extensions

More terms from T. D. Noe and Ray Chandler, Aug 10 2005

A261414 2^n+1 appears in A109732 at position a(n).

Original entry on oeis.org

2, 5, 30, 38, 201, 242, 689, 1806, 7175, 10839, 21474, 64607, 290563, 290579, 581260, 872576, 2617577, 5238258, 7858320, 19886365, 47140605, 70713773, 212133736
Offset: 1

Views

Author

N. J. A. Sloane, Aug 25 2015

Keywords

Comments

This assumes van der Poorten's conjecture that every odd number does appear in A109732.

Examples

			A109732(38) = 17 = 2^4+1, so a(4)=38.
		

Crossrefs

Programs

  • Maple
    m:= 22000: # m is the search limit
    b:= proc() true end:
    s:= heap[new]((x, y)-> is(x>y), 1):
    for n to m do t:= heap[extract](s); b(t):= false;
      if t>1 and t-1=2^ilog2(t-1) then print(ilog2(t-1), t, n) fi;
      k:= 2*t+1; if b(k) then heap[insert](k, s) fi;
      if irem(t, 3, 'k')=0 and b(k) then heap[insert](k, s) fi
    od:  # Alois P. Heinz, Aug 27 2015
  • Mathematica
    maxVal = 5*10^5; (* 5*10^5 gives 12 terms *)
    f[n_] := Module[{lst = {}, x = n}, While[x = 2x+1; x < maxVal, AppendTo[lst, x]]; lst];
    M = {1}; pending = f[1];
    A261414 = Reap[Print[2]; Sow[2]; While[Length[pending] > 0, next = First[pending]; pending = Rest[pending]; If[!MemberQ[M, next], AppendTo[M, next]; While[Mod[next, 3]==0 && !MemberQ[M, next/3], next = next/3; If[IntegerQ[Log[2, next-1]], Print[an = Length[M]+1]; Sow[an]]; AppendTo[M, next]; pending = Union[pending, f[next]]]]]][[2, 1]] (* Jean-François Alcover, Nov 25 2020, after T. D. Noe in A109732 *)

Extensions

a(10)-a(17) from Alois P. Heinz, Aug 27 2015
a(18)-a(23) from Alois P. Heinz, Aug 28 2015
Showing 1-2 of 2 results.