|
|
A203897
|
|
Nonprime numbers k >= 1 such that k and phi(k) contain only digits 0 and 1.
|
|
4
|
|
|
1, 1111, 110111111, 1111011011, 11000111111, 110011011011, 110111101111, 111100011011, 111101010101, 111101111011, 1010011111111, 1010101001111, 1010101101101, 1010111100101, 1011111001111, 1100000111111, 1100110011011, 1111001011111, 1111001101111
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,2
|
|
COMMENTS
|
Many terms are semiprimes of the form p*q where p = 11 or 101 and q is in A020449.
The first term after 1 that is not a semiprime is a(199) = 111100111111111111 = 11*101*100000100010001.
The first term after 1 that is not divisible by 11 or 101 is a(1023) = 1110010101001011111101 = 11111101 * 99901000000001. (End)
|
|
LINKS
|
|
|
EXAMPLE
|
a(3) = 110111111 = 11*10010101 is in the sequence because phi(110111111) = 100101000, which contains digits 0 and 1 only.
Remark: phi(11)=10, phi(10010101)=10010100, but 100101000 = 2*3*5*61*547.
|
|
MAPLE
|
with(numtheory): T:=array(1..23):k:=1:a:={0, 1}:b:={1}:for a12 from 0 to 1 do: for a11 from 0 to 1 do: for a10 from 0 to 1 do: for a9 from 0 to 1 do: for a8 from 0 to 1 do: for a7 from 0 to 1 do: for a6 from 0 to 1 do: for a5 from 0 to 1 do: for a4 from 0 to 1 do: for a3 from 0 to 1 do: for a2 from 0 to 1 do: for a1 from 0 to 1 do: for a0 from 0 to 1 do:n:=a0+a1*10+a2*10^2+ a3*10^3+ a4*10^4+ a5*10^5+ a6*10^6+ a7*10^7+ a8*10^8+ a9*10^9 + a10*10^10+ a11*10^11+ a12*10^12: m:=phi(n):x:=convert(convert(m, base, 10), set): if type(n, prime)=false and (a union x = a or a union x = b) then T[k]:=n:k:=k+1:else fi:od: od: od: od: od: od: od: od: od:od:od:od:od: print(T):
Res:= NULL: count:= 0:
for q from 1 while count < 100 do
L:= convert(q, base, 2);
n:=add(L[i]*10^(i-1), i=1..nops(L));
if isprime(n) then next fi;
r:= numtheory:-phi(n);
if max(convert(r, base, 10))=1 then
Res:= Res, n;
count:= count+1;
fi
od:
|
|
MATHEMATICA
|
d = Table[FromDigits[IntegerDigits[n, 2]], {n, 10000}]; Select[d, ! PrimeQ[#] && Max[IntegerDigits[EulerPhi[#]]] == 1 &] (* T. D. Noe, Jan 11 2012 *)
Rest[Select[FromDigits/@Tuples[{0, 1}, 13], !PrimeQ[#]&&Max[IntegerDigits[ EulerPhi[ #]]] <2&]] (* Harvey P. Dale, Jan 17 2023 *)
|
|
PROG
|
(PARI) lista(nn) = {for (n=1, nn, x = fromdigits(binary(n), 10); if (! isprime(x) && (vecmax(digits(eulerphi(x))) < 2), print1(x, ", ")); ); } \\ Michel Marcus, Jun 12 2017
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|