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.

A237661 Indices of records in A237660.

This page as a plain text file.
%I A237661 #16 Aug 14 2017 15:53:51
%S A237661 3,42,75,151,2730,7281,14563,174762,184111,932067,11184810,13256071,
%T A237661 26512143,715827882,1908874353
%N A237661 Indices of records in A237660.
%H A237661 Charles R Greathouse IV, <a href="/A237661/a237661.c.txt">C code to find initial terms</a>
%t A237661 With[{s = Table[If[AllTrue[#, EvenQ], 0, SelectFirst[Reverse@ #, OddQ]] &@ Most@ Rest@ NestWhileList[If[EvenQ@ #, #/2, (3 # + 1)/2] &, n, # > 1 &], {n, 2, 10^5}] }, 1 + Values[#][[All, 1]] &@ Rest@ KeySort@ PositionIndex@ s] (* _Michael De Vlieger_, Aug 14 2017 *)
%o A237661 (C) See Greathouse link
%o A237661 (PARI) A237660(n)=my(k); if(n%2,n=3*n+1); n>>=valuation(n,2); if(n==1,return(0)); k=n; while(1, n+=(n+1)>>1; n>>=valuation(n,2); if(n==1, return(k), k=n))
%o A237661 r=0; for(n=1,1e8, t=A237660(n); if(t>r, r=t; print1(n", "))) \\ _Charles R Greathouse IV_, Aug 14 2017
%Y A237661 Cf. A237660.
%K A237661 nonn,more
%O A237661 1,1
%A A237661 _Kival Ngaokrajang_, Feb 11 2014
%E A237661 a(11)-a(15) from _Charles R Greathouse IV_, Aug 14 2017