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 A203304 #44 Dec 28 2019 11:15:25 %S A203304 1,11,101,1111,10111,101111,1011001,1100101,10010101,10011101, %T A203304 10100011,10101101,10110011,10111001,11000111,11100101,11110111, %U A203304 11111101,100100111,100111001,101001001,101001011,101100011,101101111,101111011,101111111,110010101,110101001 %N A203304 Positive numbers n such that n and phi(n) contain digits 0 and 1 only. %C A203304 The sequence A020449 (primes that contain digits 0 and 1 only) is a subsequence because if n is prime, phi(n) = n-1 also contains only digits 0 and 1. The semiprimes in the sequence are 1111, 110111111, 1111011011, 11000111111, ... (see the sequence A203897) whose prime factors are also in the sequence, and whose smallest divisor is 11 or 101, for example 110111111=11*10010101 => 11 and 10010101 are in the sequence. %C A203304 What is the smallest n with a(n) <> A209930(n)? - _Alois P. Heinz_, Jul 16 2014 %C A203304 The first term after 1 that is not a prime or semiprime is a(8079) = 111100111111111111 = 11*101*100000100010001. - _Robert Israel_, Mar 05 2018 %H A203304 Vincenzo Librandi, <a href="/A203304/b203304.txt">Table of n, a(n) for n = 1..1000</a> %e A203304 1111 is in the sequence because phi(1111) = 1000 contains digits 0 and 1 only. This number is composite, 1111 = 11*101 => 11 and 101 are in the sequence. %p A203304 with(numtheory): T:=array(1..64):k:=1:a:={0,1}:b:={1}: 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: m:=phi(n):x:=convert(convert(m,base,10),set): if 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: print(T): %t A203304 d = Table[FromDigits[IntegerDigits[n, 2]], {n, 10000}]; Select[d, Max[IntegerDigits[EulerPhi[#]]] == 1 &] (* _T. D. Noe_, Jan 11 2012 *) %t A203304 Select[FromDigits/@Tuples[{0,1},9],SubsetQ[{0,1},IntegerDigits[ EulerPhi[ #]]]&]//Rest (* _Harvey P. Dale_, Dec 27 2019 *) %o A203304 (PARI) has(n)=my(d=Set(digits(n))); d[#d]<2 %o A203304 is(n)=has(n) && has(eulerphi(n)) \\ _Charles R Greathouse IV_, Nov 25 2014 %Y A203304 Cf. A000010, A020449, A203897, A209930. %K A203304 nonn,base %O A203304 1,2 %A A203304 _Michel Lagneau_, Jan 07 2012 %E A203304 "Positive" added by _N. J. A. Sloane_, Dec 27 2019