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

A217297 Triprimes (numbers that are a product of exactly three primes: A014612) that become cubes when their central digit or central pair of digits is deleted.

Original entry on oeis.org

207, 604, 654, 2007, 2037, 2057, 2067, 2097, 2107, 2197, 2247, 2337, 2367, 2387, 2397, 2527, 2547, 2597, 2607, 2637, 2667, 2697, 2717, 2737, 2817, 2847, 2877, 2937, 2967, 6014, 6034, 6044, 6054, 6094, 6114, 6124, 6154, 6194, 6214, 6234, 6254, 6284, 6294, 6394
Offset: 1

Views

Author

Keywords

Comments

If a number (a product of exactly three primes) has an odd number of digits, only its central digit is deleted to test for status as a cube; if such a number has an even number of digits, its two central digits are deleted to test whether that's a cube. - Harvey P. Dale, Dec 19 2020
In theory, a cube with an even number of digits could be represented in the sequence by up to 110 numbers by inserting {0,1,...,9} and {00,01,...,99}. In the first 10000 terms, 1079^3 has a record 46 representatives, though it is unlikely that this is a global record.
The cubes of 10, 20 and 48 are the first three cubes not represented in the sequence.
It would be nice to have a proof that this sequence is infinite. - N. J. A. Sloane, Dec 19 2020

Examples

			207 = 3*3*23 is a term: it becomes the cube 27 when the central digit is deleted.
2007 = 3*3*223 is a term: it becomes the cube 27 when the two central digits are deleted.
Here is a larger example taken at random from the b-file:
             4178131923 = (3)  (7)  (198958663)
Delete the central pair of digits and we get a cube: 41781923 = 347^3. - _N. J. A. Sloane_, Dec 19 2020
		

Crossrefs

Cf. A014612 ("triprimes"), A225082, A080603, A000578, A339578.

Programs

  • Mathematica
    cdn[n_]:=Module[{idn=IntegerDigits[n],len},len=Length[idn];If[OddQ[ len],FromDigits[ Drop[idn,{(len+1)/2}]],FromDigits[Drop[idn,{len/2,len/2+1}]]]]; Select[Range[100,100000],PrimeOmega[#]==3 && IntegerQ[ Surd[ cdn[#],3]]&]  (* Harvey P. Dale, Dec 19 2020 *)
  • R
    library(gmp);
    removecentraldigit<-function(x) { s=as.character(x); n=nchar(s);
        as.bigz(paste(substr(s,1,ifelse(n%%2==0,n/2-1,(n-1)/2)), substr(s,ifelse(n%%2==0,n/2+2,(n+3)/2),n),sep=""))};
    istriprime=function(x) ifelse(as.bigz(x)<8,F,length(factorize(x))==3);
    iscube<-function(x) ifelse(as.bigz(x)<2,T,all(table(as.numeric(factorize(x)))%%3==0));
    which(sapply(201:6400, function(x) istriprime(x) & iscube(removecentraldigit(x))))+200

Extensions

Edited by N. J. A. Sloane, Dec 19 2020

A321700 Base-5 deletable primes (written in base 10).

Original entry on oeis.org

2, 3, 7, 11, 13, 17, 19, 23, 37, 47, 53, 59, 61, 67, 71, 73, 79, 89, 97, 103, 107, 113, 137, 197, 227, 239, 263, 269, 271, 307, 311, 317, 337, 347, 353, 359, 367, 373, 379, 389, 397, 439, 449, 479, 487, 503, 523, 547, 557, 563, 569, 571, 607, 613, 677, 727, 739, 887, 947, 977
Offset: 1

Views

Author

Robert Price, Nov 17 2018

Keywords

Comments

A prime p is a base-b deletable prime if when written in base b it has the property that removing some digit leaves either the empty string or another deletable prime.
Deleting a digit cannot leave any leading zeros in the new string. For example, deleting the 2 in 2003 to obtain 003 is not allowed.

Crossrefs

Programs

  • Mathematica
    b = 5; d = {};
    p = Select[Range[2, 10000], PrimeQ[#] &];
    For[i = 1, i <= Length[p], i++,
      c = IntegerDigits[p[[i]], b];
      If[Length[c] == 1, AppendTo[d, p[[i]]]; Continue[]];
      For[j = 1, j <= Length[c], j++,
       t = Delete[c, j];
       If[t[[1]] == 0, Continue[]];
       If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; Break[]]]];
    d (* Robert Price, Dec 06 2018 *)

A321910 Base-7 deletable primes (written in base 10).

Original entry on oeis.org

2, 3, 5, 17, 19, 23, 31, 37, 41, 47, 101, 103, 131, 137, 139, 149, 163, 167, 191, 199, 223, 227, 233, 241, 251, 263, 293, 311, 313, 317, 331, 691, 709, 719, 727, 733, 787, 823, 853, 877, 887, 919, 929, 937, 977, 983, 997, 1013, 1019, 1021, 1031, 1049, 1129, 1171, 1367, 1399, 1409, 1511
Offset: 1

Views

Author

Robert Price, Nov 29 2018

Keywords

Comments

A prime p is a base-b deletable prime if when written in base b it has the property that removing some digit leaves either the empty string or another deletable prime.
Deleting a digit cannot leave any leading zeros in the new string. For example, deleting the 2 in 2003 to obtain 003 is not allowed.

Crossrefs

Programs

  • Mathematica
    b = 7; d = {};
    p = Select[Range[2, 10000], PrimeQ[#] &];
    For[i = 1, i <= Length[p], i++,
      c = IntegerDigits[p[[i]], b];
      If[Length[c] == 1, AppendTo[d, p[[i]]]; Continue[]];
      For[j = 1, j <= Length[c], j++,
       t = Delete[c, j];
       If[t[[1]] == 0, Continue[]];
       If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; Break[]]]];
    d (* Robert Price, Dec 06 2018 *)

A322173 Base-6 deletable primes (written in base 10).

Original entry on oeis.org

2, 3, 5, 11, 13, 17, 19, 23, 29, 31, 41, 47, 53, 59, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 227, 233, 239, 251, 257, 263, 269, 281, 283, 293, 311, 313, 317, 347, 353, 359, 373, 379, 383, 389, 397
Offset: 1

Views

Author

Robert Price, Nov 29 2018

Keywords

Comments

A prime p is a base-b deletable prime if when written in base b it has the property that removing some digit leaves either the empty string or another deletable prime.
Deleting a digit cannot leave any leading zeros in the new string. For example, deleting the 2 in 2003 to obtain 003 is not allowed.

Crossrefs

Programs

  • Mathematica
    b = 6; d = {};
    p = Select[Range[2, 10000], PrimeQ[#] &];
    For[i = 1, i <= Length[p], i++,
      c = IntegerDigits[p[[i]], b];
      If[Length[c] == 1, AppendTo[d, p[[i]]]; Continue[]];
      For[j = 1, j <= Length[c], j++,
       t = Delete[c, j];
       If[t[[1]] == 0, Continue[]];
       If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; Break[]]]];
    d (* Robert Price, Dec 06 2018 *)

A322471 Base-9 deletable primes (written in base 10).

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 23, 29, 31, 41, 43, 47, 53, 59, 61, 67, 71, 79, 83, 101, 103, 107, 137, 163, 167, 173, 179, 181, 191, 193, 199, 211, 223, 229, 233, 239, 241, 263, 269, 281, 283, 317, 331, 347, 349, 353, 367, 373, 383, 389, 401, 431, 443, 449, 461, 467, 479, 491, 509, 547, 557, 563
Offset: 1

Views

Author

Robert Price, Dec 09 2018

Keywords

Comments

A prime p is a base-b deletable prime if when written in base b it has the property that removing some digit leaves either the empty string or another deletable prime.
Deleting a digit cannot leave any leading zeros in the new string. For example, deleting the 2 in 2003 to obtain 003 is not allowed.

Crossrefs

Programs

  • Mathematica
    b = 9; d = {};
    p = Select[Range[2, 10000], PrimeQ[#] &];
    For[i = 1, i <= Length[p], i++,
    c = IntegerDigits[p[[i]], b];
    If[Length[c] == 1, AppendTo[d, p[[i]]]; Continue[]];
    For[j = 1, j <= Length[c], j++,
    t = Delete[c, j];
    If[t[[1]] == 0, Continue[]];
    If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; Break[]]]];
    d (* Robert Price, Dec 09 2018 *)

A322474 Primes that are not base-10 deletable primes (written in base 10).

Original entry on oeis.org

11, 19, 41, 61, 89, 101, 109, 149, 151, 181, 191, 199, 211, 227, 241, 251, 257, 277, 281, 349, 389, 401, 409, 419, 421, 449, 461, 491, 499, 521, 541, 557, 577, 587, 601, 619, 641, 661, 691, 727, 757, 787, 809, 811, 821, 827, 857, 877, 881, 887, 911, 919, 941, 991, 1009, 1019, 1021, 1049, 1051, 1061
Offset: 1

Views

Author

Robert Price, Dec 09 2018

Keywords

Comments

A prime p is a base-b deletable prime if when written in base b it has the property that removing some digit leaves either the empty string or another deletable prime.
Deleting a digit cannot leave any leading zeros in the new string. For example, deleting the 2 in 2003 to obtain 003 is not allowed. Thus 2003 is in this sequence but not in A081027.
Complement of all nonprimes and A305352.

Crossrefs

Programs

  • Mathematica
    b = 10; d = {};
    p = Select[Range[2, 10000], PrimeQ[#] &];
    For[i = 1, i <= Length[p], i++,
    c = IntegerDigits[p[[i]], b];
    If[Length[c] == 1, AppendTo[d, p[[i]]]; Continue[]];
    For[j = 1, j <= Length[c], j++,
    t = Delete[c, j];
    If[t[[1]] == 0, Continue[]];
    If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; Break[]]]]; Complement[Table[Prime[n], {n, PrimePi[Last[d]]}], d] (* Robert Price, Dec 09 2018 *)

A322475 Base-11 deletable primes (written in base 10).

Original entry on oeis.org

2, 3, 5, 7, 13, 23, 29, 31, 37, 41, 43, 47, 59, 61, 71, 73, 79, 83, 101, 113, 149, 151, 167, 211, 233, 251, 257, 263, 271, 283, 293, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 389, 409, 433, 439, 457, 461, 479, 487, 509, 521, 523, 557, 563, 631, 653, 659, 673, 677, 719, 733, 739
Offset: 1

Views

Author

Robert Price, Dec 09 2018

Keywords

Comments

A prime p is a base-b deletable prime if when written in base b it has the property that removing some digit leaves either the empty string or another deletable prime.
Deleting a digit cannot leave any leading zeros in the new string. For example, deleting the 2 in 2003 to obtain 003 is not allowed.

Crossrefs

Programs

  • Mathematica
    b = 11; d = {};
    p = Select[Range[2, 10000], PrimeQ[#] &];
    For[i = 1, i <= Length[p], i++,
    c = IntegerDigits[p[[i]], b];
    If[Length[c] == 1, AppendTo[d, p[[i]]]; Continue[]];
    For[j = 1, j <= Length[c], j++,
    t = Delete[c, j];
    If[t[[1]] == 0, Continue[]];
    If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; Break[]]]];
    d (* Robert Price, Dec 09 2018 *)

A322477 Base-12 deletable primes (written in base 10).

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 79, 83, 89, 101, 103, 107, 113, 127, 131, 137, 139, 149, 151, 163, 167, 173, 179, 181, 191, 197, 199, 211, 223, 227, 229, 233, 239, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 317, 331, 347, 349, 353, 359, 367, 373, 379
Offset: 1

Views

Author

Robert Price, Dec 09 2018

Keywords

Comments

A prime p is a base-b deletable prime if when written in base b it has the property that removing some digit leaves either the empty string or another deletable prime.
Deleting a digit cannot leave any leading zeros in the new string. For example, deleting the 2 in 2003 to obtain 003 is not allowed.

Crossrefs

Programs

  • Mathematica
    b = 12; d = {};
    p = Select[Range[2, 10000], PrimeQ[#] &];
    For[i = 1, i <= Length[p], i++,
    c = IntegerDigits[p[[i]], b];
    If[Length[c] == 1, AppendTo[d, p[[i]]]; Continue[]];
    For[j = 1, j <= Length[c], j++,
    t = Delete[c, j];
    If[t[[1]] == 0, Continue[]];
    If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; Break[]]]];
    d (* Robert Price, Dec 09 2018 *)

A096245 Number of n-digit base-12 deletable primes.

Original entry on oeis.org

5, 25, 186, 1398, 11500, 99074, 893062, 8352961, 80564801
Offset: 1

Views

Author

Michael Kleber, Feb 28 2003

Keywords

Comments

A prime p is a base-b deletable prime if, when written in base b, it has the property that removing some digit leaves either the empty string or another deletable prime. "Digit" means digit in base b.
Deleting a digit cannot leave any leading 0's in the new string. For example, deleting the 2 in 2003 to obtain 003 is not allowed.

Crossrefs

Programs

  • Mathematica
    b = 12; a = {5}; d = {2, 3, 5, 7, 11};
    For[n = 2, n <= 5, n++,
      p = Select[Range[b^(n - 1), b^n - 1], PrimeQ[#] &];
      ct = 0;
      For[i = 1, i <= Length[p], i++,
       c = IntegerDigits[p[[i]], b];
       For[j = 1, j <= n, j++,
        t = Delete[c, j];
        If[t[[1]] == 0, Continue[]];
        If[MemberQ[d, FromDigits[t, b]], AppendTo[d, p[[i]]]; ct++;
         Break[]]]];
      AppendTo[a, ct]];
    a (* Robert Price, Nov 13 2018 *)
  • Python
    from sympy import isprime
    from sympy.ntheory.digits import digits
    def strmap(d):
        return str(d) if d < 10 else "ABCDEFGHIJKLMNOPQRSTUVWXYZ"[d-10]
    def ok(n, prevset, base=12): # works for bases 2-36
        if not isprime(n): return False
        s = "".join(strmap(d) for d in digits(n, base)[1:])
        si = (s[:i]+s[i+1:] for i in range(len(s)))
        return any(t[0] != '0' and int(t, base) in prevset for t in si)
    def afind(terms, base=12): # works for bases 3-36
        s = set([p for p in range(1, base) if isprime(p)])
        alst, snxt = [len(s)], set()
        print(len(s), end=", ")
        for n in range(2, terms+1):
            for i in range(base**(n-1), base**n):
                if ok(i, s):
                    snxt.add(i)
            s, snxt = snxt, set()
            print(len(s), end=", ")
    afind(6) # Michael S. Branicky, Jan 17 2022

Extensions

a(6)-a(8) from Ryan Propper, Jul 19 2005
Edited by Charles R Greathouse IV, Aug 03 2010
a(9) from Michael S. Branicky, Jan 17 2022

A217256 Triprimes that become squares when their central digit (or central pair of digits) is deleted.

Original entry on oeis.org

116, 186, 245, 255, 275, 285, 316, 356, 366, 429, 604, 654, 801, 861, 1066, 1076, 1086, 1106, 1146, 1166, 1246, 1266, 1396, 1406, 1426, 1436, 1446, 1506, 1516, 1526, 1556, 1586, 1606, 1626, 1636, 1676, 1686, 1756, 1786, 1796, 1826, 1846, 1866, 1886, 1916, 1946
Offset: 1

Views

Author

Keywords

Comments

In theory, every square number potentially could have 110 triprime representatives through the insertion of 0-9, and 00-99. It appears 25, which is represented by 48 entries in the sequence, holds the record (confirmed for squares < 594441).
1600 is the first valid square number (with an even number of digits) not represented in the sequence.
104976 is the first valid square number not divisible by 100 with no representatives.

Examples

			a(1)=116 and a(15)=1066 are both triprimes (2*2*29 and 2*13*41 respectively) and become the square number 16 upon deletion.
		

Crossrefs

Programs

  • R
    library(gmp);
    removecentraldigit<-function(x) { s=as.character(x); n=nchar(s);
        as.bigz(paste(substr(s,1,ifelse(n%%2==0,n/2-1,(n-1)/2)), substr(s,ifelse(n%%2==0,n/2+2,(n+3)/2),n),sep=""))};
    istriprime=function(x) ifelse(as.bigz(x)<8,F,length(factorize(x))==3);
    issquare<-function(x) ifelse(x<2,T,all(table(as.numeric(factorize(x)))%%2==0))
    which(sapply(101:1500,function(x) istriprime(x) & issquare(removecentraldigit(x))))+100
Previous Showing 11-20 of 37 results. Next