|
|
A094387
|
|
Numbers k such that gcd(k, A000120(k)) = 1.
|
|
14
|
|
|
1, 2, 3, 4, 5, 7, 8, 9, 11, 13, 14, 15, 16, 17, 19, 22, 23, 25, 26, 27, 28, 29, 31, 32, 33, 35, 37, 38, 39, 41, 43, 44, 45, 47, 49, 50, 51, 52, 53, 56, 57, 59, 61, 62, 64, 65, 67, 70, 71, 73, 74, 75, 76, 77, 79, 82, 83, 85, 87, 88, 89, 91, 93, 94, 95, 97, 98, 99, 100, 101, 103
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
This sequence has density 6/Pi^2 (Olivier, 1975).
All primes, powers of 2, and powers of two plus one are terms of this sequence. - William Boyles, Jan 27 2022
|
|
REFERENCES
|
Jean-Paul Allouche and Jeffrey Shallit, Automatic Sequences, Cambridge University Press, 2003, p. 117.
|
|
LINKS
|
|
|
MATHEMATICA
|
Select[Range[100], CoprimeQ[#, DigitCount[#, 2, 1]] &] (* Amiram Eldar, Nov 22 2020 *)
|
|
PROG
|
(PARI) lista(nn) = {for (n=1, nn, if (gcd(n, norml2(binary(n))) == 1, print1(n, ", ")); ); } \\ Michel Marcus, May 25 2013
(Python)
from math import gcd
def ok(n): return gcd(n, bin(n).count('1')) == 1
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|