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-2 of 2 results.

A020466 Primes that contain digits 4 and 9 only.

Original entry on oeis.org

449, 499, 4999, 9949, 44449, 49499, 49999, 94949, 94999, 444449, 994949, 999499, 4444949, 4449449, 4944949, 4949449, 4999949, 4999999, 9444949, 9494999, 9944449, 9994499, 44444999, 44499449, 44944499, 44994949, 49444949, 49444999, 49494499
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A036319 (composite numbers having all their prime factors in this sequence).

Programs

  • Mathematica
    Flatten[Table[Select[FromDigits/@Tuples[{4,9},n],PrimeQ],{n,8}]] (* Vincenzo Librandi, Jul 27 2012 *)
  • PARI
    is(N)=isprime(N)&&!#setminus(Set(digits(N)), [4,9]) \\ M. F. Hasler, Sep 22 2020

A036945 Smallest n-digit prime containing only the digits 4 and 9, or 0 if no such prime exists.

Original entry on oeis.org

0, 0, 449, 4999, 44449, 444449, 4444949, 44444999, 444499949, 4444444999, 44444449949, 444444494449, 4444449444949, 44444444449499, 444444444499499, 4444444444444999, 44444444444444999, 444444444449449949
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Examples

			44449 is the least prime of 5 digits containing just digits 4 and 9 so a(5) = 44449. - _David A. Corneth_, Oct 10 2019
		

Crossrefs

Programs

  • Mathematica
    Join[{0,0},Table[SelectFirst[10*FromDigits[#]+9&/@Tuples[{4,9},n],PrimeQ],{n,2,20}]] (* Harvey P. Dale, Aug 20 2021 *)
  • PARI
    a(n) = my(s=4*(10^(n)-1)/9);forstep(i=1, 2^n-1, 2, fr = fromdigits(5 * binary(i)) + s; if(isprime(fr), return(fr))); 0 \\ David A. Corneth, Oct 10 2019
Showing 1-2 of 2 results.