login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A203304 Positive numbers n such that n and phi(n) contain digits 0 and 1 only. 3
1, 11, 101, 1111, 10111, 101111, 1011001, 1100101, 10010101, 10011101, 10100011, 10101101, 10110011, 10111001, 11000111, 11100101, 11110111, 11111101, 100100111, 100111001, 101001001, 101001011, 101100011, 101101111, 101111011, 101111111, 110010101, 110101001 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
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.
What is the smallest n with a(n) <> A209930(n)? - Alois P. Heinz, Jul 16 2014
The first term after 1 that is not a prime or semiprime is a(8079) = 111100111111111111 = 11*101*100000100010001. - Robert Israel, Mar 05 2018
LINKS
EXAMPLE
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.
MAPLE
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):
MATHEMATICA
d = Table[FromDigits[IntegerDigits[n, 2]], {n, 10000}]; Select[d, Max[IntegerDigits[EulerPhi[#]]] == 1 &] (* T. D. Noe, Jan 11 2012 *)
Select[FromDigits/@Tuples[{0, 1}, 9], SubsetQ[{0, 1}, IntegerDigits[ EulerPhi[ #]]]&]//Rest (* Harvey P. Dale, Dec 27 2019 *)
PROG
(PARI) has(n)=my(d=Set(digits(n))); d[#d]<2
is(n)=has(n) && has(eulerphi(n)) \\ Charles R Greathouse IV, Nov 25 2014
CROSSREFS
Sequence in context: A073030 A290295 A209930 * A283906 A284028 A284407
KEYWORD
nonn,base
AUTHOR
Michel Lagneau, Jan 07 2012
EXTENSIONS
"Positive" added by N. J. A. Sloane, Dec 27 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 20:05 EDT 2024. Contains 371254 sequences. (Running on oeis4.)