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.

A355430 Primes starting with an even decimal digit.

Original entry on oeis.org

2, 23, 29, 41, 43, 47, 61, 67, 83, 89, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 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
Offset: 1

Views

Author

Bernard Schott, Jul 20 2022

Keywords

Comments

Primes whose reversal is an even integer.

Examples

			43 is a term because 43 is prime and 34 is an even number.
		

Crossrefs

Intersection of A000040 and A273892.
Equals disjoint union of A045708, A045710, A045712 and A045714.
Primes whose reversal is a multiple of k: this sequence (k=2), {3} (k=3), A045711 (k=5), A087762 (k=7), {11} (k=11), A087764 (k=13), A087765 (k=17), A087766 (k=19), A087767 (k=23).

Programs

  • Mathematica
    imax=142; a={}; For[i=1, i<=imax, i++, If[EvenQ[FromDigits[Reverse[IntegerDigits[Prime[i]]]]], AppendTo[a,Prime[i]]]]; a (* Stefano Spezia, Jul 20 2022 *)
    Select[Prime[Range[200]],EvenQ[IntegerDigits[#][[1]]]&] (* Harvey P. Dale, May 18 2025 *)
  • PARI
    isok(k) = isprime(k) && !(fromdigits(Vecrev(digits(k))) % 2); \\ Michel Marcus, Jul 20 2022
    
  • Python
    from sympy import isprime
    def ok(n): return str(n)[0] in "2468" and isprime(n)
    print([k for k in range(822) if ok(k)]) # Michael S. Branicky, Jul 25 2022
    
  • Python
    from sympy import isprime
    from itertools import chain, count, islice, product
    def agen(): yield from chain((2,), (t for t in (b+i for d in count(1) for b in range(2*10**d, 10*10**d, 2*10**d) for i in range(1, 10**d, 2)) if isprime(t)))
    print(list(islice(agen(), 62))) # Michael S. Branicky, Jul 25 2022