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 41-50 of 56 results. Next

A085414 Primes that are a concatenation of a prime and its first digit.

Original entry on oeis.org

131, 191, 313, 373, 797, 1031, 1091, 1511, 1571, 1811, 1931, 3313, 3373, 3533, 3593, 3673, 3733, 3793, 3833, 7517, 7577, 7877, 9199, 9419, 9479, 9539, 9679, 9719, 9839, 10091, 10211, 10331, 10391, 10631, 10691, 11171, 12011, 12491, 12791, 12911
Offset: 1

Views

Author

Zak Seidov, Jun 29 2003

Keywords

Comments

Also primes remaining prime after deleting last digit, but not all such primes. See also A012833, A024770, A033664, A069867.

Examples

			13 is a term because concatenation of 13 and 1 is prime.
		

Crossrefs

A202264 Noncomposite numbers in which all substrings and reversal substrings are noncomposites.

Original entry on oeis.org

1, 2, 3, 5, 7, 11, 13, 17, 31, 37, 71, 73, 113, 131, 311, 313, 373
Offset: 1

Views

Author

Jaroslav Krizek, Dec 25 2011

Keywords

Comments

Sequence is finite with 17 terms.
Supersequence of A202263, A085823.
Subsequence of A068669, A012883, A024770, A012883.

Examples

			All substrings and reversal substrings of 311 are noncomposites: 1, 3, 11, 13, 31, 113, 311.
		

Crossrefs

Cf. A202263 (primes in which all substrings and reversal substrings are primes), A202265 (nonprimes in which all substrings and reversal substrings are nonprimes), A202266 (composite numbers in which all substrings and reversal substrings are composites).

A214847 Primes that become emirps when their most-significant-digit is deleted.

Original entry on oeis.org

113, 131, 137, 173, 179, 197, 271, 313, 317, 331, 337, 373, 379, 397, 431, 479, 571, 613, 617, 631, 673, 773, 797, 937, 971, 997, 1013, 1031, 1097, 1709, 1733, 1907, 2017, 2113, 2179, 2311, 2347, 2389, 2953, 2971, 3037, 3079, 3167, 3347, 3359, 3389, 3701, 3709
Offset: 1

Views

Author

Keywords

Examples

			113 and 1013 are both in the sequence, because upon deletion they become 13, which is an emirp.
		

Crossrefs

Programs

  • R
    library(gmp); isemirp<-function(x) isprime(x) & (j=paste(rev(unlist(strsplit(as.character(x),split=""))),collapse=""))!=x & isprime(j);
    no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s}
    i=as.bigz(0); y=as.bigz(rep(0,100)); len=0;
    while(len<100)
    if(isemirp(as.bigz(no0(substr((i=nextprime(i)),2,200)))))
    y[(len=len+1)]=i

A225234 Primes whose internal digits are an emirp.

Original entry on oeis.org

1171, 1319, 1373, 1733, 1973, 1979, 2131, 2137, 2179, 2311, 2371, 2377, 2711, 2713, 2719, 2731, 2791, 2797, 2971, 3137, 3313, 3319, 3371, 3373, 3719, 3733, 3739, 3793, 3797, 4133, 4139, 4177, 4373, 4733, 4793, 4799, 4973, 5171, 5179, 5711, 5717, 5737, 5791
Offset: 1

Views

Author

Keywords

Comments

a(414) = 112019 is the first term with an internal even digit.

Examples

			Example: 1171 has the emirp 17 as its internal digits.
		

Crossrefs

Programs

  • R
    library(gmp); isemirp<-function(x) isprime(x) & (j=paste(rev(unlist(strsplit(as.character(x),split=""))),collapse=""))!=x & isprime(j);
    no0<-function(s){ while(substr(s,1,1)=="0" & nchar(s)>1) s=substr(s,2,nchar(s)); s}
    i=as.bigz(0); y=as.bigz(rep(0,100)); len=0;
    while(len<100) if(isemirp(as.bigz(no0(substr((i=nextprime(i)),2,nchar(as.character(i))-1))))) y[(len=len+1)]=i

A226531 Cubes that become prime when their least-significant (rightmost) digit is removed.

Original entry on oeis.org

27, 3375, 4096, 4913, 35937, 97336, 110592, 148877, 421875, 681472, 1191016, 1442897, 1560896, 2628072, 3241792, 3581577, 3869893, 4741632, 5359375, 8998912, 10218313, 12649337, 16777216, 16974593, 21253933, 26730899, 31255875, 32157432, 43986977, 45882712
Offset: 1

Views

Author

Keywords

Examples

			4096 = 16^3, and becomes the prime number 409 when truncated.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000]^3,PrimeQ[Floor[#/10]]&] (* Harvey P. Dale, May 28 2021 *)
  • R
    library(gmp)trimR=function(x) { x=as.character(x); ifelse(nchar(x)<2,0,substr(x,1,nchar(x)-1)) }
    y=as.bigz(rep(0,10000)); len=0; n=as.bigz(-1)
    while(len<10000) if(isprime(trimR((n=n+1)^3))) y[(len=len+1)]=n^3

A258032 Primes p such that p^3 with the rightmost digit removed is also prime.

Original entry on oeis.org

3, 17, 53, 113, 157, 233, 257, 277, 353, 359, 379, 397, 677, 877, 997, 1039, 1217, 1439, 1613, 1697, 1879, 1973, 1997, 2273, 2417, 2459, 2777, 3257, 3413, 3499, 3517, 3697, 3779, 4073, 4157, 4177, 4339, 4973, 4999, 5077, 5197, 5279, 5639, 5813, 5897, 6277, 6379
Offset: 1

Views

Author

K. D. Bajpai, May 16 2015

Keywords

Examples

			a(2) = 17 is prime: 17^3 = 4913. Removing rightmost digit gives 491 which is prime.
a(3) = 53 is prime: 53^3 = 148877. Removing rightmost digit gives 14887 which is prime.
		

Crossrefs

Programs

  • Haskell
    a258032 n = a258032_list !! (n-1)
    a258032_list = filter ((== 1) . a010051' . flip div 10. (^ 3)) a000040_list
    -- Reinhard Zumkeller, May 18 2015
  • Magma
    [p: p in PrimesUpTo(6500) |IsPrime(Floor(p^3/10))]; // Vincenzo Librandi, May 17 2015
    
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[Floor[(#^3)/10]] &]
  • PARI
    forprime(p=1,10000, if(isprime(floor((p^3)/10)), print1(p,", ")))
    

A383779 Primes where successively deleting the least significant digit yields a sequence that alternates between a prime and a nonprime at every step until a single-digit number remains.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 41, 43, 47, 61, 67, 83, 89, 97, 211, 223, 227, 229, 241, 251, 257, 263, 269, 271, 277, 281, 283, 307, 331, 337, 347, 349, 353, 359, 367, 383, 389, 397, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 701, 709, 727, 743, 751, 757, 761, 769, 773, 787
Offset: 1

Views

Author

Stefano Spezia, May 09 2025

Keywords

Comments

Is this sequence infinite?
Likely no, see A383780 and comment there. - Michael S. Branicky, May 11 2025
From Michael S. Branicky, May 16 2025: (Start)
Sequence is finite with 3356513448 terms (cf. A383780).
Last term: 70123916363515199416199518301698321195339012727994799190371992151279729974757397909992327936943877127375781091143 (End)

Examples

			211 is a term since 211 is a prime, 21 is a nonprime, and 2 is a prime;
23 is not a term since 23 and 2 are both prime.
		

Crossrefs

Programs

  • Mathematica
    Unprotect[CompositeQ]; CompositeQ[1]:=True; Protect[CompositeQ]; Q[n_]:=And[AllTrue[FromDigits/@Table[Take[IntegerDigits[n], i], {i,IntegerLength[n],1,-2}], PrimeQ], AllTrue[FromDigits/@Table[Take[IntegerDigits[n], i], {i,IntegerLength[n]-1,1,-2}],CompositeQ]]; Select[Prime[Range[140]], Q]
  • Python
    from gmpy2 import is_prime, mpz
    from itertools import count, islice
    def agen():
        olst, elst = [2, 3, 5, 7], [11, 13, 17, 19, 41, 43, 47, 61, 67, 83, 89, 97]
        yield from olst + elst
        for n in count(1):
            olst2, elst2 = [], []
            for o in olst:
                for i in range(1, 100, 2):
                    t = 100*o + i
                    if is_prime(t) and not is_prime(t//10):
                        olst2.append(t)
            yield from olst2
            for e in elst:
                for i in range(100):
                    t = 100*e + i
                    if is_prime(t) and not is_prime(t//10):
                        elst2.append(t)
            yield from elst2
            olst, elst = olst2, elst2
    print(list(islice(agen(), 70))) # Michael S. Branicky, May 11 2025
    
  • Python
    # predicate test useful for large n (cf. a-file of largest terms)
    from gmpy2 import digits, is_prime, mpz
    def ok(n):
        s = digits(n)
        return is_prime(n) and all(int(is_prime(mpz(s[:-i]))) == 1-i&1 for i in range(1, len(s)))
        # Michael S. Branicky, May 16 2025

A144714 Left-truncatable primes that contain one or more zero digits.

Original entry on oeis.org

103, 107, 307, 503, 607, 907, 1013, 1097, 1103, 1307, 1607, 1907, 2003, 2017, 2053, 2083, 2503, 3023, 3037, 3067, 3083, 3307, 3607, 3907, 4003, 4007, 4013, 4073, 5003, 5023, 5107, 5503, 6007, 6037, 6043, 6047, 6053, 6067, 6073, 6607, 6907, 7013, 7043
Offset: 1

Views

Author

Harry J. Smith, Oct 08 2008

Keywords

Comments

These are the terms in sequence A033664 that are not in A024785. This sequence is infinitely long.

Crossrefs

Programs

  • PARI
    zeroin(z)={until(z==0,q=z\10;r=z-10*q;if(r==0,return(1));z=q;);return(0);}
    {fileO="b144714.txt";v=vector(15000);v[1]=2;v[2]=3;v[3]=5;v[4]=7;j=4;m=0;
    p10=1;until(0,p10*=10;j0=j;for(k=1,9,k10=k*p10;for(i=1,j0,z=k10+v[i];
    if(isprime(z),j++;v[j]=z;if(zeroin(z),m++;
    write(fileO,m," ",z);if(m==10000,break(3));)))));}

A240174 a(n) is the right-truncatable prime of n digits appearing as the initial digits of the smallest number of the form exp(k) for some positive integer k.

Original entry on oeis.org

2, 73, 373, 3733, 23333, 719333, 2339933, 23399339
Offset: 1

Views

Author

James G. Merickel, Apr 02 2014

Keywords

Comments

When the numbers here are concatenated through to the end, the factorizations are:
3 * 7 * 13,
461 * 593,
83 * 32936551,
151 * 1810419690883,
(3^3) * 827 * 12242974308000077,
7 * 73 * 173 * 727 * 4409 * 9647498037197777, and
100003 * 2733651723681626744530004033113.
As the probability of a random string of 4 digits all matching (selected uniformly over {0,1,2,3,...,9}) is one in 1/1000, the coincidence here by a criterion involving this feature would make these concatenations' factorizations seem somewhat freakish. There appears to be little guidance in the mathematical literature in English on measuring or rank-ordering what appear to be digital or other types of coincidence (see, for example, the reference on this subject as it currently stands at Wikipedia (below)).
The exponents producing these leading digits are 1, 2, 75, 75, 1562, 17573, 454667, and 3471613.

Examples

			2 is the leading single digit of e itself and is by the convention of A024770 considered truncatable; the leading digits of e^2, without decimal, are the right-truncatable 73; and e^75 is then the first to produce a 3-digit right-truncatable prime, also producing the 4-digit one (a(3)=373 and a(4)=3733, with e^75 beginning with these digits).
		

Crossrefs

Cf. A024770.

Programs

  • PARI
    {
    \\ R is the array of 8 by-length ordered lists of right-truncatable primes.\\
    \\ a is the vector of list-sizes for R.\\
    R=[[2,3,5,7],[23,29,31,37,53,59,71,73,79],[223,239,293,311,313,317,373,379,593,599,719,733,739,797],[2333,2339,2393,2399,2939,3119,3137,3733,3739,3793,3797,5939,7193,7331,7333,7393],[23333,23339,23399,23993,29399,31193,31379,37337,37339,37397,59393,59399,71933,73331,73939],[233993,239933,293999,373379,373393,593933,593993,719333,739393,739397,739399],[2339933,2399333,2939999,3733799,5939333,7393913,7393933],[23399339,29399999,37337999,59393339,73939133]];
    a=[4,9,14,16,15,12,8,5];i=1;e=exp(1);e1=e/10;n=e;
    for(j=1,8,
      E=10^j;while(1,
        m=floor(n);for(k=1,a[j],
          if(m==R[j][k],print(m);n*=10;break(2)));
        if(n>E/e,n*=e1,n*=e);i++))
    }

A289190 Numbers k such that k^2 with last digit deleted is a prime.

Original entry on oeis.org

5, 6, 14, 26, 44, 46, 56, 64, 74, 76, 86, 94, 106, 146, 154, 164, 206, 226, 236, 244, 254, 256, 274, 286, 296, 304, 314, 326, 344, 346, 364, 424, 436, 446, 454, 464, 506, 524, 536, 596, 614, 664, 674, 676, 686, 694, 706, 764, 776, 796, 826, 844, 854, 874, 944, 946
Offset: 1

Views

Author

K. D. Bajpai, Jun 27 2017

Keywords

Examples

			14 is in the sequence because 14^2 = 196; deleting the last digit gives 19 which is prime.
26 is in the sequence because 26^2 = 676; deleting the last digit gives 67 which is prime.
		

Crossrefs

Programs

  • Magma
    [n : n in [1 .. 2000] | IsPrime (Floor (n^2/10))];
    
  • Maple
    select(n -> isprime(floor(n^2/10)),[$1..2000]);
  • Mathematica
    fQ[n_] := PrimeQ@Quotient[n^2, 10]; Select[Range[1, 2000], fQ]
  • PARI
    isok(n) = isprime(n^2\10); \\ Michel Marcus, Jul 02 2017
Previous Showing 41-50 of 56 results. Next