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 31-40 of 56 results. Next

A069866 Primes in which repeatedly deleting the most significant digit then the least significant digit gives a prime at every step until a single-digit prime remains.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 23, 37, 43, 47, 53, 67, 73, 83, 97, 131, 137, 173, 179, 223, 229, 271, 331, 337, 353, 359, 373, 379, 431, 479, 523, 571, 631, 653, 659, 673, 773, 823, 829, 853, 859, 929, 937, 953, 971, 1031, 1373, 1433, 1439, 1733, 2029, 2053, 2131, 2137
Offset: 1

Views

Author

Amarnath Murthy, Apr 21 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 400, AllTrue[FromDigits /@ Rest@ Fold[Append[#1, Delete[Last[#1], 1 - 2 Boole[EvenQ@ #2]]] &, {#}, Range[Length@ # - 1]] &@ IntegerDigits[#], PrimeQ] &] (* Michael De Vlieger, Jan 20 2018 *)

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Sep 24 2002

A202263 Primes in which all substrings and reversal substrings are primes.

Original entry on oeis.org

2, 3, 5, 7, 37, 73, 373
Offset: 1

Views

Author

Jaroslav Krizek, Dec 25 2011

Keywords

Comments

Sequence is finite with 7 terms.
Subsequence of A085823, A068669, A024770, A012883.

Examples

			All substrings and reversal substrings of 373 are primes:3, 7, 37, 73, 373.
		

Crossrefs

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

A232125 Smallest prime such that the n numbers obtained by removing 1 digit on the right are also prime, while no digit can be added on the right to get another prime.

Original entry on oeis.org

53, 53, 317, 2393, 23333, 373393, 2399333, 23399339, 1979339333, 103997939939, 4099339193933, 145701173999399393, 2744903797739993993333, 52327811119399399313393, 13302806296379339933399333
Offset: 0

Views

Author

Michel Marcus, Nov 19 2013

Keywords

Comments

Inspired by article on 43 in Archimedes' Lab link.

Examples

			a(0)=53 because 53 is the smallest prime such that all numbers obtained by adding a digit to the right are composite.
a(1)=53 because 5 and 53 are primes.
a(2)=317 because 3, 31, 317 are all primes, and 317 has the same property as 53 when adding a digit to the right.
		

Crossrefs

Programs

  • PARI
    a(n) = {n++; v = vector(n); i = 1; ok = 0; until (ok, while ((i>1) && (v[i] == 9), v[i] = 0; i--); if (i == 1, v[i] = nextprime(v[i]+1), v[i] = v[i]+1); curp = sum (j=1, i, v[j]*(10^(i-j))); if (isprime(curp), if (i != n, i++, nbp = 0; for (z=1, 9, if (isprime(10*curp+z), nbp++);); if (nbp == 0, ok = 1);););); sum (j=1, n, v[j]*(10^(n-j)));}
    
  • Python
    from sympy import isprime, nextprime
    def a(n):
        p, oo = 2, float('inf')
        while True:
            extends, reach, r1 = 0, [str(p)], []
            while len(reach) > 0 and extends <= n:
                minnotext = oo
                for s in reach:
                    wasextended = False
                    for d in "1379":
                        if isprime(int(s+d)): r1.append(s+d); wasextended = True
                    if not wasextended: minnotext = min(minnotext, int(s))
                if extends == n and minnotext < oo: return minnotext
                if len(r1) > 0: extends += 1
                reach, r1 = r1, []
            p = nextprime(p)
    for n in range(12): print(a(n), end=", ") # Michael S. Branicky, Aug 08 2021

Extensions

a(12)-a(13) from Michael S. Branicky, Aug 08 2021
a(14) from Michael S. Branicky, Aug 23 2021

A127889 Smallest n-digit right-truncatable prime.

Original entry on oeis.org

2, 23, 233, 2333, 23333, 233993, 2339933, 23399339
Offset: 1

Views

Author

Ray Chandler, Feb 04 2007

Keywords

Comments

Agrees with A088603 for 8 terms, but this sequence ends there while A088603 continues.
Right-truncatable means that the integer part of successive divisions by 10 always yields primes (or zero). - M. F. Hasler, Nov 07 2018

Crossrefs

Programs

  • PARI
    A127889=vector(8, n, p=concat(apply(t->primes([t, t+1]*10), if(n>1, p))); p[1]) \\ M. F. Hasler, Nov 07 2018

A210498 Prime numbers that become emirps when their least-significant-digit is deleted.

Original entry on oeis.org

131, 137, 139, 173, 179, 311, 313, 317, 373, 379, 719, 733, 739, 797, 971, 977, 1493, 1499, 1571, 1579, 1993, 1997, 1999, 3119, 3371, 3373, 3593, 7013, 7019, 7331, 7333, 7393, 7433, 7517, 7691, 7699, 9371, 9377, 9413, 9419, 9533, 9539, 9677, 9679, 9719, 9833
Offset: 1

Views

Author

Keywords

Comments

This sequence (like the emirps) experiences large gaps when the most-significant-digit is {2,4,5,6,8}.

Examples

			Example: a(1)=131, which becomes 13 upon deletion, 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);i=as.bigz(0); y=as.bigz(rep(0,100)); len=0;
    while(len<100)
        if(isprime((i=nextprime(i))))
            if(isemirp(as.bigz(substr(i,1,nchar(as.character(i))-1))))
                y[(len=len+1)]=i

A226354 Squares that become cubes when their rightmost digit is removed.

Original entry on oeis.org

1, 4, 9, 16, 81, 10000, 640000, 7290000, 40960000, 156250000, 188210961, 466560000, 1176490000, 2621440000, 5314410000, 10000000000, 17715610000, 29859840000, 48268090000, 75295360000, 113906250000, 167772160000, 241375690000, 340122240000, 470458810000
Offset: 1

Views

Author

Keywords

Examples

			188210961=13719^2, while 18821096=266^3.
		

Crossrefs

Programs

  • Mathematica
    cQ[n_]:=IntegerQ[Surd[FromDigits[Most[IntegerDigits[n]]],3]]; Select[Range[ 700000]^2,cQ] (* Harvey P. Dale, Feb 21 2014 *)
  • R
    trimR=function(x) { x=as.character(x); ifelse(nchar(x)<2,0,substr(x,1,nchar(x)-1)) }
    iscube<-function(x) ifelse(as.bigz(x)<2,T,all(table(as.numeric(factorize(x)))%%3==0))
    which(sapply(1:6400,function(x) iscube(trimR(x^2))))^2

Formula

For n > 11: a(n)=(100*(n-6)^3)^2 (188210961 is the last "exception" as is easy to prove with the help of the Nagell-Lutz theorem). - Reiner Moewald, Dec 30 2013

A024768 Prefix primes in base 8 (written in base 8).

Original entry on oeis.org

2, 3, 5, 7, 21, 23, 27, 35, 37, 51, 53, 57, 73, 75, 211, 213, 235, 277, 351, 357, 373, 513, 533, 535, 573, 577, 737, 753, 2111, 2117, 2135, 2353, 2773, 3513, 3517, 3571, 3733, 5331, 5355, 5735, 5773, 7371, 7531, 7533, 21113, 21117, 21177, 21355, 23537, 27733
Offset: 1

Views

Author

Keywords

Comments

The final term is a(68) = 21117717.

Crossrefs

Programs

  • Maple
    s:=[1,3,5,7]: a:=[[2],[3],[5],[7]]: l1:=1: l2:=4: do for j from l1 to l2 do for k from 1 to 4 do d:=[s[k], op(a[j])]: if(isprime(op(convert(d, base, 8, 8^nops(d)))))then a:=[op(a), d]: fi: od: od: l1:=l2+1: l2:=nops(a): if(l1>l2)then break: fi: od: for j from 1 to nops(a) do printf("%d, ", op(convert(a[j], base, 10, 10^nops(a[j])))); od: # Nathaniel Johnston, Jun 22 2011

A069867 Primes in which repeatedly deleting the least significant digit then the most significant digit gives a prime at every step until a single-digit prime remains.

Original entry on oeis.org

2, 3, 5, 7, 23, 29, 31, 37, 53, 59, 71, 73, 79, 131, 137, 139, 173, 179, 233, 239, 373, 379, 431, 433, 439, 479, 673, 677, 733, 739, 839, 971, 977, 1319, 1373, 1733, 2237, 2239, 2293, 2297, 2711, 2713, 2719, 3313, 3319, 3371, 3373, 3533, 3539, 3593, 3733
Offset: 1

Views

Author

Amarnath Murthy, Apr 21 2002

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 512, AllTrue[FromDigits /@ Rest@ Fold[Append[#1, Delete[Last[#1], 1 - 2 Boole[OddQ@ #2]]] &, {#}, Range[Length@ # - 1]] &@ IntegerDigits[#], PrimeQ] &] (* Michael De Vlieger, Jan 20 2018 *)

Extensions

Corrected and extended by Larry Reeves (larryr(AT)acm.org), Sep 24 2002

A127890 Largest n-digit right-truncatable prime.

Original entry on oeis.org

7, 79, 797, 7393, 73939, 739399, 7393933, 73939133
Offset: 1

Views

Author

Ray Chandler, Feb 04 2007

Keywords

Comments

For a variant see the Howard reference. - Alexander R. Povolotsky, Dec 23 2007
Right-truncatable means that the integer part of successive divisions by 10 always yields primes (or zero). - M. F. Hasler, Nov 07 2018

References

  • Toby Howard, "Magic Pi - The Magic of Numbers", PC Advisor magazine, May 1998.

Crossrefs

Programs

  • PARI
    A127890=vector(8, n, p=concat(apply(t->primes([t, t+1]*10), if(n>1, p)));p[#p]) \\ M. F. Hasler, Nov 07 2018

A239747 Super-prime leaders: right-truncatable primes p with property that appending any single decimal digit to p does not produce a prime.

Original entry on oeis.org

53, 317, 599, 797, 2393, 3793, 3797, 7331, 23333, 23339, 31193, 31379, 37397, 73331, 373393, 593993, 719333, 739397, 739399, 2399333, 7393931, 7393933, 23399339, 29399999, 37337999, 59393339, 73939133
Offset: 1

Views

Author

Arkadiusz Wesolowski, Mar 26 2014

Keywords

Comments

The name "super-prime leaders" is not due to the author.

Examples

			2393 belongs to this sequence because 2393, 239, 23 and 2 are all prime; 10*2393 + k, for k = 0 to 9, are all composite.
		

References

  • Joe Roberts, Lure of the Integers, The Mathematical Association of America, 1992, p. 292.

Crossrefs

Subsequence of A024770 and of A119289.

Programs

  • PARI
    f=1; for(n=2, 73939133, v=n; t=1; while(isprime(n), if(!Mod(f, n^2)==0, t=t*n); c=n; n=(c-lift(Mod(c, 10)))/10); if(n==0, f=f*t); n=v); s=Set(factor(f)[, 1]); for(k=1, #s, p=s[k]; if(!Mod(f, p^2)==0, print1(p, ", ")));

Formula

A024770 INTERSECT A119289.
Previous Showing 31-40 of 56 results. Next