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-10 of 27 results. Next

A032702 Numbers k such that k prefixed by '2' and followed by '1' is prime.

Original entry on oeis.org

1, 4, 5, 7, 8, 11, 13, 14, 16, 22, 25, 28, 31, 34, 35, 37, 38, 41, 44, 52, 53, 55, 59, 62, 67, 71, 73, 74, 79, 80, 85, 86, 97, 100, 101, 103, 106, 110, 112, 119, 121, 122, 134, 139, 140, 148, 149, 152, 160, 161, 166, 170, 175, 182, 184, 185, 187, 188, 191, 196
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Extensions

Offset changed by Andrew Howroyd, Aug 11 2024

A032711 Numbers k such that k prefixed by '2' and followed by '3' is prime.

Original entry on oeis.org

2, 3, 6, 8, 9, 11, 14, 15, 20, 21, 24, 27, 29, 33, 38, 39, 42, 47, 50, 54, 59, 63, 66, 68, 69, 71, 75, 80, 83, 84, 90, 95, 96, 101, 102, 114, 116, 119, 128, 131, 132, 138, 143, 149, 150, 152, 156, 161, 167, 168, 171, 177, 180, 186, 189, 194, 200, 201, 206, 207, 209
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

This sequence is infinite, a consequence of the Prime Number Theorem in arithmetic progressions. - Charles R Greathouse IV, Sep 26 2012

Examples

			8 and 21 are in the sequence because 283 and 2213 are primes.
		

Crossrefs

Programs

  • Mathematica
    v={};Do[If[PrimeQ[FromDigits[Join[{2},IntegerDigits[n],{3}]]], v=Append[v,n]],{n, 260}];v (* Farideh Firoozbakht, Jun 15 2003 *)
    Select[Range[210],PrimeQ[FromDigits[Join[{2},IntegerDigits[#],{3}]]]&] (* Harvey P. Dale, May 02 2012 *)
  • PARI
    for( n=1,300, isprime(eval(Str(2,n,3))) & print1(n",")) \\ M. F. Hasler, Mar 18 2008

Extensions

Merged with data from duplicate entry A092114. - M. F. Hasler, Mar 18 2008

A032734 All 81 combinations of prefixing and following a(n) by a single digit are nonprime.

Original entry on oeis.org

2437, 5620, 7358, 11111, 13308, 13332, 13650, 14612, 19737, 19817, 24217, 25213, 26302, 27971, 28472, 28838, 29289, 29542, 29650, 31328, 33027, 33170, 35914, 35970, 36186, 37977, 38327, 39127, 39608, 40078, 41165, 41528, 42422, 43277, 44657, 45649, 47172, 47382
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Examples

			2437 prefixed and followed with a pair of digits from (1,2,3,4,5,6,7,8,9) never yields a prime, e.g., '9'2437'1' = 7 * 37 * 43 * 83.
		

Crossrefs

Programs

  • Maple
    isA032734 := proc(n)
            for k from 1 to 9 do
            for k2 from 1 to 9 do
                    dgs := [k,op(convert(n,base,10)),k2] ;
                    dgsn := add( op(i,dgs)*10^(i-1),i=1..nops(dgs)) ;
                    if isprime(dgsn) then
                            return false;
                    end if;
            end do:
            end do:
            return true;
    end proc:
    for n from 1 to 50000 do
            if isA032734(n) then
                    printf("%d,",n);
            end if;
    end do: # R. J. Mathar, Oct 22 2011
    filter:= proc(n) local d,i,j;
         d:= 10^(ilog10(n)+2);
         not ormap(isprime,[seq(seq(d*i+10*n+j,j=[1,3,5,7,9]),i=1..9)])
    end proc:
    select(filter,[$1..10^5]); # Robert Israel, Jul 07 2016
  • Mathematica
    ok[n_] := With[{id = IntegerDigits[n]}, Select[ Flatten[ Table[ FromDigits[ Join[{j}, id, {k}]], {j, 1, 9}, {k, 1, 9}], 1], PrimeQ, 1] == {}]; A032734 = {}; n = 1; While[n < 50000, If[ok[n], Print[n]; AppendTo[A032734, n]]; n++]; A032734(* Jean-François Alcover, Nov 23 2011 *)
    Select[Range[50000],NoneTrue[Flatten[Table[FromDigits[Join[{x}, IntegerDigits[ #],{y}]],{x,9},{y,9}]],PrimeQ]&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Apr 07 2018 *)
  • PARI
    is_A032734(n)=p=10^#Str(n*=10);forstep(k=n+p,n+9*p,p,nextprime(k)>k+9 || return);1 \\ M. F. Hasler, Oct 22 2011
    
  • Python
    from sympy import isprime
    def ok(n):
        s, fdigs, edigs = str(n), "123456789", "1379"
        return not any(isprime(int(f+s+e)) for f in fdigs for e in edigs)
    print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Sep 05 2022

A032703 Numbers k such that k prefixed by '3' and followed by '1' is prime.

Original entry on oeis.org

1, 3, 12, 18, 19, 22, 25, 27, 30, 33, 36, 37, 39, 46, 49, 51, 54, 57, 58, 63, 67, 69, 70, 76, 82, 85, 88, 91, 93, 105, 108, 109, 112, 115, 118, 123, 127, 132, 139, 148, 151, 153, 154, 160, 172, 174, 175, 177, 189, 198, 199, 205, 214, 219, 225, 226, 232, 234
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Maple
    seq(op(select(x -> isprime(3*10^d+10*x+1),[$10^(d-2)..10^(d-1)-1])),d=2..4); # Robert Israel, Oct 22 2018
  • Mathematica
    Select[Range[250],PrimeQ[FromDigits[Join[{3}, IntegerDigits[#], {1}]]]&]  (* Harvey P. Dale, Mar 28 2011 *)

Extensions

Offset changed to 1 by Robert Israel, Oct 22 2018

A032732 Numbers k such that k prefixed by '7' and followed by '9' is prime.

Original entry on oeis.org

0, 1, 3, 6, 10, 12, 15, 21, 22, 30, 34, 36, 45, 48, 49, 52, 54, 55, 58, 63, 64, 66, 69, 75, 78, 82, 87, 91, 94, 103, 105, 106, 108, 111, 112, 120, 124, 132, 133, 135, 138, 139, 141, 142, 147, 154, 156, 169, 171, 178, 180, 184, 187, 189, 190, 199, 201, 208, 210
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[0,300],PrimeQ[FromDigits[Join[{7},IntegerDigits[#],{9}]]]&] (* Harvey P. Dale, Dec 03 2021 *)

Extensions

Offset changed by Andrew Howroyd, Aug 13 2024

A032737 Composite numbers k such that all the decimal concatenations ik and ikj (i, j = 1...9) are also composite.

Original entry on oeis.org

5620, 7358, 13308, 13332, 13650, 14612, 26302, 27971, 28472, 28838, 29542, 29650, 31328, 33027, 33170, 35914, 35970, 36186, 39608, 40078, 41165, 41528, 42422, 47172, 47382, 48046, 48052, 48454, 50774, 52735, 55553, 60222, 60806
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

The old definition was that a(n) must be composite and "cannot be prefixed or followed by any digit to form a prime ('empty' suffixes are allowed)".

Examples

			55553 prefixed with a digit from (1,2,3,4,5,6,7,8,9) and followed by a digit from ('',1,3,7,9) never yields a prime: '3'55553'_' = 11 x 32323; '2'5620'9' = 3 x 41 x 2083.
		

Crossrefs

Programs

  • Maple
    # Naive program to test for membership -  N. J. A. Sloane, Jan 01 2025:
    isA032737 := proc(x) local S,y,L1,L2,i,j;
    L1:=[seq(i,i=1..9)]; L2:=[1,3,7,9];
    S:=[x];
    for i in L1 do y:=parse(cat(i,x)); S:=[op(S),y]; od:
    for i in L1 do for j in L2 do y:=parse(cat(i,x,j)); S:=[op(S),y]; od: od:
    for i in S do if isprime(i) then return('false', i,"is prime"); break; fi; od:
    'true';
    end;
  • Mathematica
    pfdQ[n_]:=CompositeQ[n]&&NoneTrue[Flatten[Table[10(d1*10^IntegerLength[n]+n)+d2,{d1,Range[9]},{d2,{1,3,7,9}}]],PrimeQ] && NoneTrue[ Flatten[Table[d1*10^IntegerLength[n]+n,{d1,Range[9]}]],PrimeQ]; Select[Range[61000],pfdQ] (* Harvey P. Dale, Jan 01 2025 *)

Extensions

Offset changed by Andrew Howroyd, Aug 13 2024
Definition revised by N. J. A. Sloane, Jan 01 2025
Terms corrected and extended by Harvey P. Dale, Jan 01 2025

A032704 Numbers k such that k prefixed by '4' and followed by '1' is prime.

Original entry on oeis.org

0, 2, 3, 6, 9, 11, 20, 21, 23, 24, 26, 27, 39, 42, 44, 45, 48, 56, 59, 62, 65, 69, 72, 75, 80, 83, 86, 87, 93, 95, 101, 105, 108, 113, 114, 116, 120, 122, 123, 128, 134, 135, 138, 141, 149, 152, 161, 162, 164, 165, 168, 176, 177, 180, 185, 191, 194, 198, 206
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[0,250],PrimeQ[FromDigits[Join[{4},IntegerDigits[#],{1}]]]&] (* Harvey P. Dale, Aug 30 2025 *)

Extensions

Offset changed by Andrew Howroyd, Aug 11 2024

A032706 Numbers k such that k prefixed by '6' and followed by '1' is prime.

Original entry on oeis.org

0, 3, 4, 6, 9, 10, 12, 13, 15, 21, 22, 27, 30, 31, 36, 42, 45, 48, 49, 52, 55, 57, 58, 66, 69, 70, 76, 78, 79, 84, 87, 91, 96, 97, 99, 100, 103, 105, 109, 112, 114, 115, 121, 123, 126, 129, 133, 138, 144, 147, 151, 156, 163, 165, 168, 175, 178, 186, 187, 196
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[0,200],PrimeQ[FromDigits[Join[{6},IntegerDigits[#],{1}]]]&] (* Harvey P. Dale, Jun 20 2020 *)

Extensions

Offset changed by Andrew Howroyd, Aug 11 2024

A032707 Numbers k such that k prefixed by '7' and followed by '1' is prime.

Original entry on oeis.org

0, 5, 6, 12, 15, 21, 32, 33, 35, 41, 45, 48, 54, 56, 59, 62, 68, 69, 74, 84, 90, 95, 101, 108, 116, 117, 119, 126, 134, 141, 147, 155, 167, 171, 174, 176, 182, 186, 188, 194, 197, 203, 209, 210, 216, 221, 222, 225, 227, 234, 242, 243, 246, 248, 255, 266
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    n71Q[n_]:=PrimeQ[FromDigits[Join[{7},IntegerDigits[n],{1}]]]; Select[ Range[ 0,300],n71Q] (* Harvey P. Dale, Jun 20 2017 *)

Extensions

Offset changed by Andrew Howroyd, Aug 11 2024

A032710 Numbers k such that k prefixed by '1' and followed by '3' is prime.

Original entry on oeis.org

0, 1, 6, 7, 9, 10, 12, 15, 16, 19, 21, 22, 28, 30, 37, 42, 43, 45, 48, 49, 52, 54, 55, 58, 61, 66, 69, 72, 73, 75, 78, 82, 87, 91, 93, 97, 99, 100, 108, 109, 111, 117, 121, 124, 127, 135, 138, 139, 142, 144, 148, 150, 159, 163, 174, 178, 181, 183, 186, 190, 192
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[0,200],PrimeQ[FromDigits[Join[{1},IntegerDigits[#],{3}]]]&] (* Harvey P. Dale, Dec 18 2012 *)

Extensions

Offset changed by Andrew Howroyd, Aug 13 2024
Showing 1-10 of 27 results. Next