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 11 results. Next

A034302 Zeroless primes that remain prime if any digit is deleted.

Original entry on oeis.org

23, 37, 53, 73, 113, 131, 137, 173, 179, 197, 311, 317, 431, 617, 719, 1499, 1997, 2239, 2293, 3137, 4919, 6173, 7433, 9677, 19973, 23833, 26833, 47933, 73331, 74177, 91733, 93491, 94397, 111731, 166931, 333911, 355933, 477797, 477977
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (inits, tails)
    a034302 n = a034302_list !! (n-1)
    a034302_list = filter f $ drop 4 a038618_list where
       f x = all (== 1) $ map (a010051 . read) $
                 zipWith (++) (inits $ show x) (tail $ tails $ show x)
    -- Reinhard Zumkeller, Dec 17 2011
    
  • Mathematica
    rpnzQ[n_]:=Module[{idn=IntegerDigits[n]},Count[idn,0]==0 && And@@ PrimeQ[FromDigits/@ Subsets[IntegerDigits[n], {Length[idn]-1}]]]; Select[Prime[Range[40000]],rpnzQ]  (* Harvey P. Dale, Mar 24 2011 *)
  • PARI
    is(n)=my(d=digits(n),t=2^#d-1); if(vecmin(d)==0, return(0)); for(i=0,#d-1, if(!isprime(fromdigits(vecextract(d,t-2^i))), return(0))); isprime(n) \\ Charles R Greathouse IV, Jun 23 2017
    
  • Python
    from itertools import product
    from sympy import isprime
    A034302_list, m = [23, 37, 53, 73], 7
    for l in range(1,m-1): # generate all terms less than 10^m
        for d in product('123456789',repeat=l):
            for e in product('1379',repeat=2):
                s = ''.join(d+e)
                if isprime(int(s)):
                    for i in range(len(s)):
                        if not isprime(int(s[:i]+s[i+1:])):
                            break
                    else:
                        A034302_list.append(int(s)) # Chai Wah Wu, Apr 05 2021

A057876 Primes p with the following property: let d_1, d_2, ... be the distinct digits occurring in the decimal expansion of p. Then for each d_i, dropping all the digits d_i from p produces a prime number. Leading 0's are not allowed.

Original entry on oeis.org

23, 37, 53, 73, 113, 131, 137, 151, 173, 179, 197, 211, 311, 317, 431, 617, 719, 1531, 1831, 1997, 2113, 2131, 2237, 2273, 2297, 2311, 2797, 3137, 3371, 4337, 4373, 4733, 4919, 6173, 7297, 7331, 7573, 7873, 8191, 8311, 8831, 8837, 12239, 16673, 19531
Offset: 1

Views

Author

Patrick De Geest, Oct 15 2000

Keywords

Examples

			1531 gives primes 53, 131 and 151 after dropping digits 1, 5 and 3.
A larger example 1210778071 gives primes 12177871, 2077807, 110778071, 1210801 and 121077071 after dropping digits 0, 1, 2, 7 and 8.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,d,Lp;
      if not isprime(n) then return false fi;
      L:= convert(n,base,10);
      for d in convert(L,set) do
        Lp:= subs(d=NULL,L);
        if Lp=[] or Lp[-1] = 0 then return false fi;
        if not isprime(add(Lp[i]*10^(i-1),i=1..nops(Lp))) then return false fi;
      od;
      true
    end proc:
    select(filter, [seq(i,i=13..20000,2)]); # Robert Israel, Jul 13 2018

Extensions

Name edited by Robert Israel, Jul 13 2018

A057883 Smallest possible prime with at least n (from 2 to 10) distinct digits that remains prime (leading zeros not allowed) when all occurrences of its digits d are deleted.

Original entry on oeis.org

23, 137, 6173, 37019, 5600239, 476710937, 8192454631, 1645957688093, 78456580281239
Offset: 2

Views

Author

Patrick De Geest, Oct 15 2000

Keywords

Examples

			5600239 is a solution for at least 6 digits because 56239, 560039, 560029, 600239, 500239 and 560023 are all primes.
		

Crossrefs

Extensions

More terms from Giovanni Resta, Feb 15 2006

A034304 Nonprime; becomes prime if any digit is deleted (zeros not allowed in the number).

Original entry on oeis.org

22, 25, 27, 32, 33, 35, 52, 55, 57, 72, 75, 77, 111, 117, 119, 171, 371, 411, 413, 417, 437, 471, 473, 611, 671, 711, 713, 731, 1379, 1397, 1673, 1739, 1937, 1991, 2233, 2277, 2571, 2577, 2811, 3113, 3131, 3173, 3311, 3317, 3479, 4199, 4331, 4433, 4439
Offset: 1

Views

Author

Keywords

Comments

From David A. Corneth, Sep 14 2019: (Start)
Terms can't contain digits of the form 0 (mod 3), 1 (mod 3) and 2 (mod 3) as then one can remove a digit to get a multiple of 3. Classifying digits mod 3 could give further restrictions on the frequency of digits per class.
For example, let (d0, d1, d2) be the frequency of digits from each residue class mod 3 respectively. Then a term can't be of the form (0, 2, 3) as removing a digit from the class 2 (mod 3) gives a multiple of 3. (End)

Crossrefs

Programs

  • Haskell
    a034304 n = a034304_list !! (n-1)
    a034304_list = map read $ filter (f "") $
                   map show $ dropWhile (< 10) a259315_list :: [Integer] where
       f _ "" = True
       f us (v:vs) = a010051' (read (us ++ vs)) == 1 && f (us ++ [v]) vs
    -- Reinhard Zumkeller, Jun 24 2015
  • Mathematica
    With[{nn=5000},Select[Complement[Range[10,nn],Prime[Range[ PrimePi[ nn]]]], DigitCount[#,10,0]==0&&And@@PrimeQ[FromDigits/@Subsets[ IntegerDigits[#],{IntegerLength[#]-1}]]&]] (* Harvey P. Dale, Apr 06 2012 *)

Extensions

Definition corrected by T. D. Noe, Apr 02 2008

A034303 Zeroless primes that become nonprime if any digit is deleted.

Original entry on oeis.org

11, 19, 41, 61, 89, 227, 251, 257, 277, 281, 349, 449, 499, 521, 557, 577, 587, 727, 757, 787, 821, 827, 857, 877, 881, 887, 991, 1117, 1129, 1171, 1187, 1259, 1289, 1423, 1447, 1453, 1471, 1483, 1543, 1553, 1559, 1583, 1621, 1669, 1721, 1741, 1747
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (inits, tails)
    a034303 n = a034303_list !! (n-1)
    a034303_list = filter f $ drop 4 a038618_list where
       f x = all (== 0) $ map (a010051 . read) $
                 zipWith (++) (inits $ show x) (tail $ tails $ show x)
    -- Reinhard Zumkeller, Dec 17 2011
  • Mathematica
    Select[Prime[Range[5,300]],Union[PrimeQ[FromDigits/@Table[Delete[ IntegerDigits[ #], n],{n,IntegerLength[#]}]]] == {False} && !MemberQ[ IntegerDigits[#],0]&] (* Harvey P. Dale, Jan 09 2014 *)

Extensions

Definition corrected by T. D. Noe, Apr 02 2008
Name edited by Jon E. Schoenfield, Feb 07 2022

A057877 a(n) = smallest n-digit prime in A057876.

Original entry on oeis.org

23, 113, 1531, 12239, 111317, 1111219, 11119291, 111111197, 1111113173, 11111133017, 111111189919, 1111111411337, 11111111161177, 111111111263311, 1111111111149119, 11111111111179913, 111111111111118771, 1111111111111751371, 11111111111111111131, 111111111111113129773, 1111111111111111337111
Offset: 2

Views

Author

Patrick De Geest, Oct 15 2000

Keywords

Examples

			1531 gives primes 53, 131 and 151 after dropping digits 1, 5 and 3.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,d,Lp;
      if not isprime(n) then return false fi;
      L:= convert(n,base,10);
      for d in convert(L,set) do
        Lp:= subs(d=NULL,L);
        if Lp=[] or Lp[-1] = 0 then return false fi;
        if not isprime(add(Lp[i]*10^(i-1),i=1..nops(Lp))) then return false fi;
      od;
      true
    end proc:
    Res:= NULL:
    for t from 1 to 21 do
      for x from (10^(t+1)-1)/9 by 2 do
        if filter(x) then Res:= Res, x; break fi
      od
    od:
    Res; # Robert Israel, Jul 13 2018
  • Mathematica
    Do[k = (10^n - 1)/9; While[d = IntegerDigits[k]; !PrimeQ[k] || !PrimeQ[ FromDigits[ DeleteCases[d, 0]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 1]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 2]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 3]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 4]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 5]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 6]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 7]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 8]]] || !PrimeQ[ FromDigits[ DeleteCases[d, 9]]], k++ ]; Print[k], {n, 2, 19}]

Extensions

Extended by Robert G. Wilson v, Dec 17 2002
More terms from Robert Israel, Jul 13 2018

A057880 Primes with 4 distinct digits that remain prime (no leading zeros allowed) after deleting all occurrences of its digits d.

Original entry on oeis.org

6173, 12239, 16673, 19531, 19973, 21613, 22397, 22937, 34613, 36137, 47933, 51193, 54493, 56519, 56531, 56591, 69491, 69497, 72937, 76873, 93497, 96419, 96479, 96497, 98837, 112939, 118213, 131779, 143419, 144497, 159319, 163337
Offset: 1

Views

Author

Patrick De Geest, Oct 15 2000

Keywords

Crossrefs

Programs

  • Maple
    filter:= proc(L) local d,Lp,i;
          if L[-1]=0 then return false fi;
          if not isprime(add(L[i]*10^(i-1),i=1..nops(L))) then return false fi;
          for d in convert(L,set) do
            Lp:= remove(`=`,L,d);
            if Lp[-1] = 0 or not isprime(add(Lp[i]*10^(i-1),i=1..nops(Lp))) then return false fi;
          od;
          true
    end proc:
    getCands:= proc(n, m) option remember;
       if m = 1 then return [seq([d$n], d=0..9)] fi;
       if n < m then return [] fi;
       [seq(seq([i,op(L)],i= {$0..9} minus convert(L,set)),L = procname(n-1,m-1)),
        seq(seq([i,op(L)],i=convert(L,set)),L = procname(n-1,m))]
    end proc:
    [seq(op(sort(map(t->add(t[i]*10^(i-1),i=1..nops(t)),select(filter,getCands(d,4))))),d=4..6)]; # Robert Israel, Jan 19 2017
  • Mathematica
    p4dQ[n_]:=Module[{idn=IntegerDigits[n]},Count[idn,0]==0 && Count[ DigitCount[ n],0]==6&&AllTrue[FromDigits/@Table[DeleteCases[idn,k],{k,Union[idn]}],PrimeQ]]; Select[Prime[Range[ 15000]],p4dQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 30 2017 *)

Extensions

Offset changed by Robert Israel, Jan 19 2017

A057882 Primes with 6 distinct digits that remain prime (no leading zeros allowed) after deleting all occurrences of its digits d.

Original entry on oeis.org

5600239, 21066319, 42209639, 63019679, 82190131, 95422517, 113420491, 114248737, 130194791, 132863191, 135160339, 137697019, 145136591, 145611439, 146414839, 153160517, 159136291, 181680713, 186601339, 186609331, 190714133
Offset: 1

Views

Author

Patrick De Geest, Oct 15 2000

Keywords

Crossrefs

Extensions

Offset changed by Andrew Howroyd, Aug 14 2024

A057878 Primes with 2 distinct digits that remain prime (no leading zeros allowed) after deleting all occurrences of its digits d.

Original entry on oeis.org

23, 37, 53, 73, 113, 131, 151, 211, 311, 11111111111111111131, 11111111111111117111, 11111111111131111111, 11111111131111111111, 111111111111111111111113, 111111111111111112111111, 111111111111111121111111, 111111111112111111111111, 111111115111111111111111
Offset: 1

Views

Author

Patrick De Geest, Oct 15 2000

Keywords

Comments

Digits 0, 4, 6, 8, and 9 can never occur; digits 2, 3, 5, 7 can occur at most once in a term; every other digit is a 1. - Sean A. Irvine, Jul 11 2022

Crossrefs

Extensions

More terms from Sean A. Irvine, Jul 11 2022

A057879 Primes with 3 distinct digits that remain prime (no leading zeros allowed) after deleting all occurrences of any one of its distinct digits.

Original entry on oeis.org

137, 173, 179, 197, 317, 431, 617, 719, 1531, 1831, 1997, 2113, 2131, 2237, 2273, 2297, 2311, 2797, 3137, 3371, 4337, 4373, 4733, 4919, 7297, 7331, 7573, 7873, 8191, 8311, 8831, 8837, 33413, 33713, 34313, 37313, 41117, 41999, 44417, 49199, 73331
Offset: 1

Views

Author

Patrick De Geest, Oct 15 2000

Keywords

Comments

Numbers in A057876 with exactly 3 distinct digits.

Crossrefs

Intersection of A057876 and A235155.

Extensions

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