A059662 Positions of the flipped bits (here they are always set from 0 to 1) in the sequence A059661.
0, 2, 4, 3, 12, 5, 14, 27, 8, 25, 30, 31, 36, 13, 18, 131, 60, 133, 458, 247, 1040, 21, 618, 283, 300, 209, 6282, 19107, 11792, 3401, 30214, 1211, 3044, 15989, 30194
Offset: 1
Examples
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.
Programs
-
Maple
map(floor_log_2,map(abs,DIFF(A059661))); # For floor_log_2, which essentially computes log[2](x) here, see A054429
-
Python
from sympy import isprime from itertools import islice def agen(): an, bit, p = 2, 1, 0 while True: while an&bit or not isprime(an+bit): bit <<= 1; p += 1 yield p an, bit, p = an+bit, 1, 0 print(list(islice(agen(), 26))) # Michael S. Branicky, Oct 01 2022
Formula
Extensions
a(21)-a(27) from Sean A. Irvine, Oct 01 2022
a(28)-a(30) from Michael S. Branicky, Oct 02 2022
a(31)-a(35) from Michael S. Branicky, May 29 2023
Comments