cp's OEIS Frontend

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.

Showing 1-1 of 1 results.

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

Original entry on oeis.org

10111, 1011001, 1100101, 10010101, 10100011, 101001001, 1000001011, 1000010101, 1010000011, 1100010001, 10000001101, 10001000011, 10001001001, 10001100001, 10100000011, 10100001001, 11000000101, 11001000001
Offset: 1

Views

Author

Lekraj Beedassy, Mar 04 2009

Keywords

Comments

Intersection of A062339 and A020449. Subsequence of A235154. - Felix Fröhlich, Nov 19 2014
Primes that are the sum of four distinct powers of ten (A038446). - Jeppe Stig Nielsen, May 18 2023

Crossrefs

Cf. A020449, A038446, A062339, A235154, A383675 (number of n-digit terms).

Programs

  • Maple
    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
  • Mathematica
    Flatten[Select[FromDigits/@Permutations[Join[{1,1,1,1},PadRight[{},7,0]]],PrimeQ]] // Union (* Harvey P. Dale, May 09 2019 *)
  • 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
    
  • 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

Extensions

Extended by numerous authors, Mar 06 2009
Showing 1-1 of 1 results.