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.

A223458 Primes whose first digit is a composite number.

Original entry on oeis.org

41, 43, 47, 61, 67, 83, 89, 97, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881
Offset: 1

Views

Author

K. D. Bajpai, Aug 24 2013

Keywords

Examples

			409 is a prime number whose first digit is 4, a composite number, so 409 is a term.
		

Crossrefs

Cf. A069090 (primes none of whose proper initial segments are primes).

Programs

  • Maple
    KD := proc() local a,b,d,e;  a:= ithprime(n);  b:=length(a);  d:=a/(10^(b-1));  e:=floor(d); if isprime(e)=false and e>1 then RETURN (a): fi; end: seq(KD(),n=1..200);
  • Python
    from sympy import primerange
    from itertools import count, islice
    def agen(): yield from (p for e in count(1) for k in [4, 6, 8, 9] for p in primerange(k*10**e, (k+1)*10**e))
    print(list(islice(agen(), 54))) # Michael S. Branicky, Jun 25 2022