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

A042986 Primes congruent to {0, 1, 2, 3} mod 5.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 23, 31, 37, 41, 43, 47, 53, 61, 67, 71, 73, 83, 97, 101, 103, 107, 113, 127, 131, 137, 151, 157, 163, 167, 173, 181, 191, 193, 197, 211, 223, 227, 233, 241, 251, 257, 263, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 353, 367, 373, 383
Offset: 1

Views

Author

Keywords

Comments

Apart from first term, A143390 is a subsequence. - Reinhard Zumkeller, Aug 13 2008
Primes whose last digit is not 9. Complement of A030433 in A000040. - Chai Wah Wu, Apr 29 2025

Crossrefs

Programs

  • Magma
    [ p: p in PrimesUpTo(500) | p mod 5 in [0..3] ]; // Vincenzo Librandi, Dec 25 2010
  • Mathematica
    Select[Prime[Range[100]],MemberQ[{0,1, 2,3},Mod[#,5]]&] (* Vincenzo Librandi, Aug 09 2012 *)

A012884 Numbers such that every prefix and suffix is 1 or a prime.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 71, 73, 113, 131, 137, 173, 197, 311, 313, 317, 373, 797, 1373, 1997, 3137, 3797, 7331, 73331, 739397
Offset: 1

Views

Author

Larry Calmer (larry(AT)wri.com), Simon Plouffe

Keywords

Comments

Last term is 739397 (confirmed by David W. Wilson).
Intersection of A012883 and A143390. [Reinhard Zumkeller, Aug 13 2008]

Crossrefs

Cf. A068669.

Programs

  • Mathematica
    prQ[n_] := n == 1 || PrimeQ[n];
    okQ[n_] := Module[{dd, nd}, dd = IntegerDigits[n]; nd = Length[dd]; AllTrue[Range[nd], prQ@ FromDigits@ Take[dd, #]&] && AllTrue[Range[nd-1], prQ@ FromDigits@ Drop[dd, #]&]];
    {1}~Join~Select[Prime@Range[60000], okQ] (* Jean-François Alcover, Nov 20 2019 *)

A160337 1 plus primes using only digits {0, 1, 2, 3, 5, 7}.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 23, 31, 37, 53, 71, 73, 101, 103, 107, 113, 127, 131, 137, 151, 157, 173, 211, 223, 227, 233, 251, 257, 271, 277, 307, 311, 313, 317, 331, 337, 353, 373, 503, 521, 523, 557, 571, 577, 701, 727, 733, 751, 757, 773, 1013, 1021, 1031
Offset: 1

Views

Author

Mohit Singh Kanwal (mohit_kanwal(AT)hotmail.com), May 10 2009

Keywords

Crossrefs

Programs

  • Python
    from sympy import isprime
    def ok(n): return n == 1 or (set(str(n)) <= set("012357") and isprime(n))
    print([m for m in range(1032) if ok(m)]) # Michael S. Branicky, Jan 25 2021

A278698 Primes p such that every suffix of the base-5 representation of p is either a prime or 1.

Original entry on oeis.org

2, 3, 7, 11, 13, 17, 23, 53, 61, 67, 73, 101, 103, 107, 113, 127, 251, 257, 263, 311, 317, 353, 503, 523, 601, 607, 613, 1303, 1567, 1753, 1877, 2503, 3023, 6257, 6263, 6311, 6317, 6323, 6353, 6857, 6863, 7817, 8753, 9377, 12503, 12511, 12517, 12553, 12601, 12613, 12757
Offset: 1

Views

Author

Randy L. Ekl, Nov 26 2016

Keywords

Examples

			61=221_5 is in the sequence since it is a prime and each of its base-5 suffixes (21_5=11 and 1_5=1) is either prime or 1.
		

Crossrefs

Programs

  • PARI
    expand(v,d)=my(u=List(v), D=5^d); forstep(x=D,4*D,D, for(i=1,#v, if(isprime(t=x+v[i]), listput(u,t)))); Vec(u)
    list(lim)=my(v=[1,2,3]); for(n=1,#digits(lim\=1,5)-1, v=expand(v,n)); select(k->k<=lim && k>1, v) \\ Charles R Greathouse IV, Nov 26 2016
    
  • PARI
    isok(n) = {if (isprime(n), pp = 5^logint(n, 5); while ((isprime(rem=(n % pp)) || (rem == 1)) && (pp != 1), pp = pp/5); pp == 1;);} \\ Michel Marcus, Nov 26 2016
Showing 1-4 of 4 results.