login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A366550
Numbers k such that bitwise AND of prime(k) and prime(k+1) = 1.
1
2, 6, 18, 54, 564, 3512, 6542, 564163, 2063689, 54400028, 5586502348, 252252704148404, 971269945245201, 3745011184713964
OFFSET
1,1
COMMENTS
Suggested by a comment by Alex Ratushnyak in A175330.
FORMULA
a(n) = A007053(A214415(n-1)).
EXAMPLE
18 is a term since prime(18) AND prime(19) = 1,
prime(18) = 61 = binary 0111101
prime(19) = 67 = binary 1000011
bitwise AND = 0000001
MATHEMATICA
A366550list[upto_]:=PrimePi[Select[2^Range[upto], BitAnd[NextPrime[#], NextPrime[#, -1]]==1&]];
A366550list[37] (* Uses formula, considering values in A214415 up to 37 *)
PROG
(PARI) isok(k) = bitand(prime(k), prime(k+1)) == 1; \\ Michel Marcus, Oct 14 2023
CROSSREFS
Positions of ones in A175330.
Sequence in context: A148455 A094590 A004529 * A238236 A294159 A000778
KEYWORD
nonn,base,hard,more
AUTHOR
Paolo Xausa, Oct 13 2023
STATUS
approved