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!)
A157711 Primes made up of 0's and four 1's only. 4

%I #26 May 19 2023 11:05:44

%S 10111,1011001,1100101,10010101,10100011,101001001,1000001011,

%T 1000010101,1010000011,1100010001,10000001101,10001000011,10001001001,

%U 10001100001,10100000011,10100001001,11000000101,11001000001

%N Primes made up of 0's and four 1's only.

%C Intersection of A062339 and A020449. Subsequence of A235154. - _Felix Fröhlich_, Nov 19 2014

%C Primes that are the sum of four distinct powers of ten (A038446). - _Jeppe Stig Nielsen_, May 18 2023

%H Jeppe Stig Nielsen, <a href="/A157711/b157711.txt">Table of n, a(n) for n = 1..10000</a> (terms 1..1000 from T. D. Noe)

%p for d from 4 to 18 do for c from 0 to 2^d-1 do bdgs := convert(c,base,2) ; if add(i,i=bdgs) = 3 then p := 10^d+add(op(i,bdgs)*10^(i-1),i=1..nops(bdgs)) ; if isprime(p) then printf("%d,",p) ; fi; fi; od: od: # _R. J. Mathar_, Mar 06 2009

%t Flatten[Select[FromDigits/@Permutations[Join[{1,1,1,1},PadRight[{},7,0]]],PrimeQ]] // Union (* _Harvey P. Dale_, May 09 2019 *)

%o (PARI) for(n=0, 10, forprime(p=10^n, (10^(n+1)-1)/9, if(vecmax(digits(p))==1, if(sumdigits(p)==4, print1(p, ", "))))) \\ _Felix Fröhlich_, Nov 19 2014

%o (PARI) my(M=20);for(i=3, M, for(j=2,i-1, for(k=1, j-1, my(p=10^i+10^j+10^k+1); isprime(p)&&print1(p,", ")))) \\ _Jeppe Stig Nielsen_, May 18 2023

%Y Cf. A038446.

%Y Cf. A020449, A062339, A235154.

%K nonn,base

%O 1,1

%A _Lekraj Beedassy_, Mar 04 2009

%E Extended by numerous authors, Mar 06 2009

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 April 18 03:33 EDT 2024. Contains 371767 sequences. (Running on oeis4.)