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.
%I A059662 #33 May 30 2023 08:27:03 %S A059662 0,2,4,3,12,5,14,27,8,25,30,31,36,13,18,131,60,133,458,247,1040,21, %T A059662 618,283,300,209,6282,19107,11792,3401,30214,1211,3044,15989,30194 %N A059662 Positions of the flipped bits (here they are always set from 0 to 1) in the sequence A059661. %C A059662 Question: If A059661 could be extended infinitely, would all the natural numbers > 1 eventually appear here once? %C A059662 a(31) > 27000. - _Michael S. Branicky_, Oct 02 2022 %F A059662 2^a(n) = A059661(n+1) - A059661(n). - _Pontus von Brömssen_, Jan 08 2023 %e A059662 Starting from A059661(1) = 2, flip (set) bit 0, gives A059661(2) = 3 (= 2+2^0), set bit 2, gives A059661(3) = 7 (3+2^2), set bit 4, gives A059661(4) = 23 (7+2^4), etc. %p A059662 map(floor_log_2,map(abs,DIFF(A059661))); # For floor_log_2, which essentially computes log[2](x) here, see A054429 %o A059662 (Python) %o A059662 from sympy import isprime %o A059662 from itertools import islice %o A059662 def agen(): %o A059662 an, bit, p = 2, 1, 0 %o A059662 while True: %o A059662 while an&bit or not isprime(an+bit): bit <<= 1; p += 1 %o A059662 yield p %o A059662 an, bit, p = an+bit, 1, 0 %o A059662 print(list(islice(agen(), 26))) # _Michael S. Branicky_, Oct 01 2022 %Y A059662 Cf. A054429, A059459, A059661, A139803. %K A059662 nonn,more,base %O A059662 1,2 %A A059662 _Antti Karttunen_, Feb 03 2001 %E A059662 a(21)-a(27) from _Sean A. Irvine_, Oct 01 2022 %E A059662 a(28)-a(30) from _Michael S. Branicky_, Oct 02 2022 %E A059662 a(31)-a(35) from _Michael S. Branicky_, May 29 2023