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.

Previous Showing 21-27 of 27 results.

A033186 Remove all 2's from decimal expansion of Pi, then all 3's, ..., then all 11's, ... (running through primes in order) with the restriction that only digits contiguous in the original expansion are removed.

Original entry on oeis.org

1, 9, 6, 9, 8, 4, 6, 6, 4, 8, 9, 0, 8, 8, 4, 1, 6, 9, 9, 9, 1, 0, 8, 0, 9, 4, 9, 4, 4, 9, 0, 8, 1, 6, 4, 0, 6, 8, 6, 0, 9, 8, 6, 8, 0, 4, 8, 4, 0, 6, 9, 8, 1, 4, 8, 0, 8, 6, 1, 8, 0, 6, 6, 4, 0, 9, 0, 8, 1, 9, 4, 0, 8, 1, 8, 4, 8, 1, 4, 0, 8, 0, 0, 8, 0, 9, 6
Offset: 1

Views

Author

Keywords

Comments

The condition to remove only contiguous digits in the original expansion ensures this sequence is well-defined. If the sequence were to be "closed up" after each prime removed, then any given initial portion will (almost certainly) be the prefix of some prime larger than those removed so far. - Sean A. Irvine, Jul 06 2020
The sequence of primes removed is given by A033274. - Sean A. Irvine, Jul 05 2020

Examples

			From _Sean A. Irvine_, Jul 05 2020: (Start)
Using "z" to denote deleted portions:
  31415926535897932...
  314159z653589793z...  (replace 2)
  z14159z65z58979zz...  (replace 3)
  z141z9z6zzz8979zz...  (replace 5)
  z141z9z6zzz89z9zz...  (replace 7)
  ...
  z1zz9z6zzz89z9zz...   (replace 41)
  ...
  z1zz9z6zzzzz9zz...    (replace 89)
Hence sequence starts, 1, 9, 6, 9, ...
(End)
		

Extensions

Definition and data modified by Simon Plouffe and Sean A. Irvine, Jul 05 2020

A137167 Semiprimes that do not contain any other semiprimes as a substring.

Original entry on oeis.org

4, 6, 9, 10, 15, 21, 22, 25, 33, 35, 38, 51, 55, 57, 58, 77, 82, 85, 87, 111, 118, 123, 178, 183, 201, 202, 203, 205, 237, 278, 301, 302, 303, 305, 323, 327, 371, 501, 502, 505, 527, 537, 703, 707, 713, 717, 718, 723, 731, 737, 753, 781, 802, 803, 807, 813, 817
Offset: 1

Views

Author

Jonathan Vos Post, Apr 03 2008

Keywords

Comments

Semiprime analog of A033274. If there is more than one digit, all digits must be nonsemiprime numbers {0,1,2,3,5,7,8}.

Examples

			Start with all semiprimes and sieve out the ones which have semiprime substrings. Semiprime A001358(5) = 14 is not in this sequence because it contains the digit "4" which is semiprime A001358(1). Semiprime A001358(35) = 106 is not in this sequence because it contains the digit "6" which is semiprime A001358(2) and also contains as substring "10" which is semiprime A001358(4).
		

Crossrefs

Programs

  • Maple
    isA001358 := proc(n) if numtheory[bigomega](n) = 2 then true ; else false ; fi ; end: Lton := proc(L) local a,i; a :=0 ; for i from 1 to nops(L) do a := 10*a+op(i,L) ; od: a ; end: isA137167 := proc(n) local dgs,strti,endi ; if isA001358(n) then dgs := ListTools[Reverse](convert(n,base,10)) ; for strti from 1 to nops(dgs) do for endi from strti to nops(dgs) do if strti > 1 or endi < nops(dgs) then if isA001358(Lton([op(strti..endi,dgs)])) then RETURN(false) : fi ; fi ; od: od: RETURN(true) ; else RETURN(false) ; fi ; end: for n from 1 to 1600 do if isA137167(n) then printf("%d,",n) ; fi ; od: # R. J. Mathar, Apr 12 2008
  • Mathematica
    smQ[n_]:=PrimeOmega[n]==2&&NoneTrue[Select[Union[FromDigits/@ Flatten[ Table[Partition[IntegerDigits[n],i,1],{i,IntegerLength[n]-1}],1]], #>0&],PrimeOmega[#]==2&]; Select[Range[1000],smQ] (* The program uses the NoneTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 26 2014 *)

Extensions

More terms from R. J. Mathar, Apr 12 2008

A179924 Primes with embedded primes.

Original entry on oeis.org

13, 17, 23, 29, 31, 37, 43, 47, 53, 59, 67, 71, 73, 79, 83, 97, 103, 107, 113, 127, 131, 137, 139, 151, 157, 163, 167, 173, 179, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337
Offset: 1

Views

Author

Robert G. Wilson v, Aug 01 2010

Keywords

Comments

A079066(a(n)) > 0. - Reinhard Zumkeller, Jul 19 2011
Is there a prime such that the previous prime is embedded in it? - Ivan N. Ianakiev, Nov 09 2023. Answer from Amiram Eldar: No. If prime(n) is embedded in prime(n+1) then prime(n+1) has at least one digit more than prime(n), so prime(n+1) > 2 * prime(n). But according to Bertrand's postulate, prime(n+1) < 2*prime(n).

Crossrefs

Programs

  • Haskell
    import Data.List (findIndices)
    a179924 n = a179924_list !! (n-1)
    a179924_list = map (a000040 . (+ 1)) $ findIndices (> 0) a079066_list
    -- Reinhard Zumkeller, Jul 19 2011
  • Mathematica
    f[n_] := Block[{id = IntegerDigits@n}, len = Length@ id - 1; Count[ PrimeQ@ Union[ FromDigits@# & /@ Flatten[ Table[Partition[id, k, 1], {k, len}], 1]], True] + 1]; Select[ Prime@ Range@ 68, f@# > 1 &]

A215927 Primes having at least one digit that is not prime.

Original entry on oeis.org

11, 13, 17, 19, 29, 31, 41, 43, 47, 59, 61, 67, 71, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 229, 239, 241, 251, 263, 269, 271, 281, 283, 293, 307, 311, 313, 317, 331, 347
Offset: 1

Views

Author

Luca Brigada Villa, Aug 27 2012

Keywords

Comments

Complement of A019546 within the primes A000040.

Examples

			19 is in the sequence because neither of its two digits is prime, 1 being a unit and 9 being the square of 3.
23 is not in the sequence because both 2 and 3 are prime.
29 is in the sequence because 9 is not prime (though 2 is).
		

Crossrefs

Programs

  • Magma
    [p: p in PrimesUpTo(500) | not Set(Intseq(p)) subset [2,3,5,7]]; // Vincenzo Librandi Oct 25 2016
  • Mathematica
    Select[Prime[Range[100]], Complement[IntegerDigits[#], {2, 3, 5, 7}] != {} &] (* Alonso del Arte, Aug 27 2012 *)
  • PARI
    is_A215927(n)=isprime(n)&apply(x->!isprime(x),eval(Vec(Str(n)))) \\ - M. F. Hasler, Aug 27 2012
    

Extensions

a(55) corrected by Vincenzo Librandi, Oct 25 2016

A033920 Largest proper substring of n-th prime that is prime (0 if none).

Original entry on oeis.org

0, 0, 0, 0, 0, 3, 7, 0, 3, 2, 3, 7, 0, 3, 7, 5, 5, 0, 7, 7, 7, 7, 3, 0, 7, 0, 3, 7, 0, 13, 7, 31, 37, 13, 0, 5, 7, 3, 67, 73, 79, 0, 19, 19, 97, 19, 11, 23, 7, 29, 23, 23, 41, 5, 7, 3, 2, 71, 7, 2, 83, 29, 7, 31, 31, 31, 31, 37, 47, 3, 53, 59, 67, 73, 79, 83, 89, 97, 0, 0, 41, 2, 43, 43, 43
Offset: 1

Views

Author

Keywords

Examples

			p(16)=53, largest prime substring is 5, so a(16)=5.
		

Crossrefs

See A033274 for the 'no prime substring' sequence.

Extensions

More terms from Patrick De Geest, Jun 15 1998

A366826 Composite numbers whose proper substrings (of their decimal expansions) are all primes.

Original entry on oeis.org

4, 6, 8, 9, 22, 25, 27, 32, 33, 35, 52, 55, 57, 72, 75, 77, 237, 537, 737
Offset: 1

Views

Author

Kalle Siukola, Oct 25 2023

Keywords

Comments

There are no terms greater than 999 because the only three-digit prime whose substrings are all primes is 373 (see A085823) and prepending or appending any prime digit to it would create a different three-digit substring.

Examples

			237 is included because it is composite and 2, 3, 7, 23 and 37 are all primes.
4 is included because it is composite and has no proper substrings.
		

Crossrefs

Subsequence of A002808.
Cf. A000040.

Programs

  • Python
    from itertools import combinations
    from sympy import isprime
    for n in range(2, 1000):
        if not isprime(n):
            properSubstrings = set(
                int(str(n)[start:end]) for (start, end)
                in combinations(range(len(str(n)) + 1), 2)
            ) - set((n,))
            if all(isprime(s) for s in properSubstrings):
                print(n, end=', ')

A374233 Irregular triangle read by rows where row n lists the primes containing at least one digit not seen in any smaller prime in base n, for n >= 2.

Original entry on oeis.org

2, 2, 3, 2, 3, 5, 17, 2, 3, 5, 19, 2, 3, 5, 7, 29, 37, 2, 3, 5, 7, 11, 13, 2, 3, 5, 7, 11, 37, 53, 67, 2, 3, 5, 7, 11, 13, 17, 59, 83, 2, 3, 5, 7, 11, 19, 41, 61, 83, 101, 2, 3, 5, 7, 11, 17, 19, 31, 37, 43, 2, 3, 5, 7, 11, 13, 53, 73, 97, 109, 127, 149
Offset: 2

Views

Author

Nicolas Bělohoubek, Jul 01 2024

Keywords

Examples

			Row n=4 is 2, 3, 5, 17, which is 2_4, 3_4, 11_4, 101_4.
First few rows:
       k=1  2  3   4   5   6   7   8
  n=2:  [2],
  n=3:  [2, 3],
  n=4:  [2, 3, 5, 17],
  n=5:  [2, 3, 5, 19],
  n=6:  [2, 3, 5,  7, 29, 37],
  n=7:  [2, 3, 5,  7, 11, 13],
  n=8:  [2, 3, 5,  7, 11, 37, 53, 67],
  ...
		

Crossrefs

Cf. A033274.

Programs

  • PARI
    isok(d, digs) = for (i=1, #d, if (!vecsearch(digs, d[i]), return(1)));
    row(n) = my(digs=List(), v=List()); forprime(p=2, , my(d = digits(p, n)); if (isok(d, Vec(digs)), listput(v, p); for (i=1, #d, listput(digs, d[i])); listsort(digs, 1); if (#digs == n, return(Vec(v))););); \\ Michel Marcus, Jul 02 2024
  • Python
    from sympy.ntheory import digits, nextprime
    def row(n):
        if n == 2: return [2]
        p, r, used = 2, [2], {2}
        while len(used) < n:
            while (ds:=set(digits(p:=nextprime(p), n)[1:])) <= used: pass
            r.append(p)
            used |= ds
        return r
    print([an for b in range(2, 13) for an in row(b)]) # Michael S. Branicky, Jul 01 2024
    
Previous Showing 21-27 of 27 results.