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

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

A038680 Primes ending in a (different) prime.

Original entry on oeis.org

13, 17, 23, 37, 43, 47, 53, 67, 73, 83, 97, 103, 107, 113, 127, 131, 137, 157, 163, 167, 173, 179, 193, 197, 211, 223, 227, 229, 233, 241, 257, 263, 271, 277, 283, 293, 307, 311, 313, 317, 331, 337, 347, 353, 359, 367, 373, 379, 383, 389, 397
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (tails)
    a038680 n = a038680_list !! (n-1)
    a038680_list = filter (any ((== 1) . a010051. read) .
                               init . tail . tails . show) a000040_list
    -- Reinhard Zumkeller, Jul 10 2013
  • Mathematica
    ds[n_] := NestWhileList[FromDigits[Rest[IntegerDigits[#]]] &, n, # > 9 &]; Select[Prime[Range[5, 80]], Or @@ PrimeQ /@ Rest[ds[#]] &] (* Jayanta Basu, Jul 10 2013 *)

Extensions

Missing a(19)=163 added by Jayanta Basu

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

A278697 Primes p such that every suffix of the base-5 representation of p is a prime.

Original entry on oeis.org

2, 3, 7, 13, 17, 23, 53, 67, 73, 103, 107, 113, 127, 257, 263, 317, 353, 503, 523, 607, 613, 1303, 1567, 1753, 1877, 2503, 3023, 6257, 6263, 6317, 6323, 6353, 6857, 6863, 7817, 8753, 9377, 12503, 12517, 12553, 12613, 12757, 12763, 12853, 13003, 31253, 31267, 31357, 31513, 31567
Offset: 1

Views

Author

Randy L. Ekl, Nov 26 2016

Keywords

Examples

			17=32_5 is in the sequence since it and its base-5 suffix (2_5=2) are primes.
113=423_5 is in the sequence since it and each of its base-5 suffixes (23_5=13 and 3_5=3) are prime.
		

Crossrefs

Cf. A033664 is in base 10.

Programs

  • Maple
    F[1]:= [2,3]:
    for m from 2 while nops(F[m-1]) < 100 do
      F[m]:= [op(F[m-1]),op(select(isprime, [seq(seq(i*5^
    (m-1)+x,x=F[m-1]),i=1..4)]))]
    od:
    F[m-1]; # Robert Israel, Jan 22 2020
  • PARI
    isok(n) = {if (isprime(n), pp = 5^logint(n, 5); while (isprime(n % pp) && (pp != 1), pp = pp/5); pp == 1;);} \\ Michel Marcus, Nov 26 2016

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));)))));}

A173057 Partial sums of A024770.

Original entry on oeis.org

2, 5, 10, 17, 40, 69, 100, 137, 190, 249, 320, 393, 472, 705, 944, 1237, 1548, 1861, 2178, 2551, 2930, 3523, 4122, 4841, 5574, 6313, 7110, 9443, 11782, 14175, 16574, 19513, 22632, 25769, 29502, 33241, 37034, 40831, 46770, 53963, 61294, 68627
Offset: 1

Views

Author

Jonathan Vos Post, Feb 08 2010

Keywords

Comments

Partial sums of right-truncatable primes, primes whose every prefix is prime (in decimal representation). The sequence has 83 terms. The subsequence of prime partial sums of right-truncatable primes begins: 2, 5, 17, 137, 1237, 1861, 2551, 199483. What is the largest value in the subsubsequence of right-truncatable prime partial sums of right-truncatable primes?

Examples

			a(50) = 2 + 3 + 5 + 7 + 23 + 29 + 31 + 37 + 53 + 59 + 71 + 73 + 79 + 233 + 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.
		

Crossrefs

A279956 Primes p such that every suffix of the base-4 representation of p is either a prime or 1.

Original entry on oeis.org

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 37, 43, 53, 59, 61, 67, 71, 83, 101, 107, 131, 139, 151, 157, 181, 193, 197, 199, 211, 229, 251, 257, 263, 269, 293, 317, 449, 467, 523, 541, 571, 613, 619, 643, 709, 769, 773, 787, 797, 811, 821, 827, 829, 839, 907, 919, 967, 997, 1019, 1031, 1061
Offset: 1

Views

Author

Randy L. Ekl, Dec 23 2016

Keywords

Examples

			107 is a term in the sequence, since 107_10=1223_4, and 223_4, 23_4 and 3_4 (43_10, 11_10, and 3_10) are all prime.
		

Crossrefs

Cf. A278454 for base 2, A278694 for base 3, A278698 for base 5, and A033664 for base 10.
Also, cf. A278699 for base 4, where the final suffix cannot be 1 (it must be a prime, i.e., 2 or 3).

A308711 Left-truncatable primes in base-10 bijective numeration.

Original entry on oeis.org

2, 3, 5, 7, 13, 17, 23, 37, 43, 47, 53, 67, 73, 83, 97, 103, 107, 113, 137, 167, 173, 197, 223, 283, 307, 313, 317, 337, 347, 353, 367, 373, 383, 397, 443, 467, 503, 523, 547, 607, 613, 617, 643, 647, 653, 673, 683, 743, 773, 797, 823, 853, 883, 907, 937, 947, 953, 967, 983, 997
Offset: 1

Views

Author

Robin Houston, Jun 19 2019

Keywords

Comments

Not identical to A033664; in fact a strict subsequence of A033664. For example, 2003 belongs to A033664 but not to this sequence, since in bijective numerals 2003 is 19X3, whose suffix 9X3 = 1003 = 17 * 59.

Crossrefs

Programs

  • Sage
    DIGITS = "123456789X"
    DECODE = {d: i + 1 for i, d in enumerate(DIGITS)}
    def decode(s):
        return reduce(lambda n, c: 10 * n + DECODE[c], s, 0)
    def search(s):
        n = decode(s)
        if n > 0:
            if not is_prime(n): return
            yield n
        for digit in DIGITS: yield from search(digit + s)
    full = sorted(search(""))
    full[:10]

A347424 Digitally delicate truncatable primes: every suffix is prime, changing any one decimal digit always produces a composite number, except the first to zero.

Original entry on oeis.org

7810223, 19579907, 909001523, 984960937, 78406036607, 90124536947, 99020400307, 190002706337, 393086079907, 500708906197, 509000702017, 600180367883, 780430098443, 3534900290107, 5046024021013, 6006006800743, 6009000432797, 9001924501223, 12090900340283
Offset: 1

Views

Author

Marc Morgenegg, Sep 01 2021

Keywords

Comments

These prime numbers are both:
- digitally delicate primes (also called weakly prime numbers) A158124: changing any one decimal digit always produces a composite number, with restriction that first digit may not be changed to a 0 (that means no change of the number of significant digits from its original value).
- left-truncatable primes A033664: every suffix is prime, means repeatedly deleting the most significant digit gives a prime at every step until a single-digit prime remains.

Crossrefs

Programs

  • Python
    from sympy import isprime, primerange
    def is_digitally_delicate(p):
        s = str(p)
        for i in range(len(s)):
            for d in "0123456789":
                if d != s[i] and not (i == int(d) == 0):
                    if isprime(int(s[:i] + d + s[i+1:])): return False
        return True
    def A033664gen(maxdigits):
        yield from [2, 3, 5, 7]
        primestrs, digits, d = ["2", "3", "5", "7"], "0123456789", 1
        while len(primestrs) > 0 and d < maxdigits:
            cands = (d+p for p in primestrs for d in "0123456789")
            primestrs = [c for c in cands if c[0] == "0" or isprime(int(c))]
            yield from sorted(map(int, (p for p in primestrs if p[0] != "0")))
            d += 1
    def afind(maxdigits):
        for p in A033664gen(maxdigits):
            if is_digitally_delicate(p): print(p, end=", ")
    afind(12) # Michael S. Branicky, Sep 01 2021

Extensions

a(3)-a(4) from Amiram Eldar, Sep 01 2021
a(5)-a(19) from Michael S. Branicky, Sep 01 2021

A173060 Partial sums of A024785.

Original entry on oeis.org

2, 5, 10, 17, 30, 47, 70, 107, 150, 197, 250, 317, 390, 473, 570, 683, 820, 987, 1160, 1357, 1580, 1863, 2176, 2493, 2830, 3177, 3530, 3897, 4270, 4653, 5050, 5493, 5960, 6483, 7030, 7643, 8260, 8903, 9550, 10203, 10876, 11559, 12302, 13075, 13872
Offset: 1

Views

Author

Jonathan Vos Post, Feb 08 2010

Keywords

Comments

Partial sums of left-truncatable primes. This sequence has 4260 terms. The subsequence of prime partial sums of left-truncatable primes begins 2, 5, 17, 47, 107, 197, 317, 683, 7643. The subsubsequence of left-truncatable prime partial sums of left-truncatable primes begins 2, 5, 197, 317.

Examples

			a(57) = 2 + 3 + 5 + 7 + 13 + 17 + 23 + 37 + 43 + 47 + 53 + 67 + 73 + 83 + 97 + 113 + 137 + 167 + 173 + 197 + 223 + 283 + 313 + 317 + 337 + 347 + 353 + 367 + 373 + 383 + 397 + 443 + 467 + 523 + 547 + 613 + 617 + 643 + 647 + 653 + 673 + 683 + 743 + 773 + 797 + 823 + 853 + 883 + 937 + 947 + 953 + 967 + 983 + 997 + 1223 + 1283 + 1367.
		

Crossrefs

Formula

a(n) = SUM[i=1..n] A024785(i) = SUM[i=1..n] {p prime, and every suffix of p in decimal expansion is prime, and no digits are zero}.
Previous Showing 11-20 of 21 results. Next