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.

Previous Showing 11-13 of 13 results.

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

A368337 Semiprimes that contain only digits 4 and 9.

Original entry on oeis.org

4, 9, 49, 94, 949, 4449, 4499, 9449, 44494, 44949, 44999, 49949, 94499, 94994, 99449, 99494, 99949, 444494, 444949, 494449, 494999, 499949, 944494, 944949, 944999, 949999, 994999, 999494, 4444449, 4444499, 4449949, 4449999, 4494449, 4494499, 4494949, 4494999, 4499449, 4499494, 4944449, 4944499
Offset: 1

Views

Author

Zak Seidov and Robert Israel, Dec 21 2023

Keywords

Comments

The only terms that are squares are 4, 9 and 49.
Numbers of n-digit terms for n = 1...20: {2, 2, 1, 3, 13, 11, 31, 39, 78, 159, 383, 541, 1302, 2047, 4268, 6926, 16248, 27172, 57397, 94581}.

Examples

			a(3) = 49 is a term because 49 = 7^2 is a semiprime with digits 4 and 9.
		

Crossrefs

Intersection of A001358 and A284973.
Cf. A020466.

Programs

  • Maple
    R:= 4,9:
    for d from 2 to 6 do
      for x from 0 to 2^d-1 do
        L:= convert(2^d+x,base,2)[1..d];
        y:= add((L[i]*5+4)*10^(i-1),i=1..d);
        if numtheory:-bigomega(y)=2 then R:= R,y; fi
    od od:
    R;

A386349 Primes without {4, 9} as digits.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 61, 67, 71, 73, 83, 101, 103, 107, 113, 127, 131, 137, 151, 157, 163, 167, 173, 181, 211, 223, 227, 233, 251, 257, 263, 271, 277, 281, 283, 307, 311, 313, 317, 331, 337, 353, 367, 373, 383, 503, 521, 523, 557, 563, 571
Offset: 1

Views

Author

Jason Bard, Jul 20 2025

Keywords

Crossrefs

Intersection of A038612 and A038617.

Programs

  • Magma
    [p: p in PrimesUpTo(10^6) | Set(Intseq(p)) subset [0, 1, 2, 3, 5, 6, 7, 8]];
    
  • Mathematica
    Select[Prime[Range[120]], DigitCount[#, 10, 4] == 0 && DigitCount[#, 10, 9] == 0 &]
  • PARI
    primes_with(, 1, [0, 1, 2, 3, 5, 6, 7, 8]) \\ uses function in A385776
  • Python
    print(list(islice(primes_with("01235678"), 41))) # uses function/imports in A385776
    
Previous Showing 11-13 of 13 results.