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.

Showing 1-4 of 4 results.

A076586 Total number of right truncatable primes in base n.

Original entry on oeis.org

0, 4, 7, 14, 36, 19, 68, 68, 83, 89, 179, 176, 439, 373, 414, 473, 839, 1010, 1577, 2271, 2848, 1762, 3376, 5913, 6795, 6352, 10319, 5866, 14639, 13303, 19439, 29982, 38956, 39323, 58857, 41646, 68371, 80754, 128859, 81453, 175734, 161438, 228543, 396274, 538797
Offset: 2

Views

Author

Martin Renner, Oct 20 2002, Sep 24 2007

Keywords

Crossrefs

Programs

  • Python
    from sympy import isprime, primerange
    from sympy.ntheory.digits import digits
    def fromdigits(digs, base):
        return sum(d*base**i for i, d in enumerate(digs))
    def a(n):
        prime_lists, an = [(p,) for p in primerange(1, n)], 0
        digits = 1
        while len(prime_lists) > 0:
            an += len(prime_lists)
            candidates = set((d,)+p for p in prime_lists for d in range(1, n))
            prime_lists = [c for c in candidates if isprime(fromdigits(c, n))]
            digits += 1
        return an
    print([a(n) for n in range(2, 27)]) # Michael S. Branicky, May 03 2022

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

A129669 Right truncatable primes in base 3 (written in decimal form).

Original entry on oeis.org

2, 7, 23, 71
Offset: 1

Views

Author

Martin Renner, Jun 01 2007

Keywords

Comments

There are exactly 4 right truncatable primes in base 3.

Crossrefs

A129670 Right truncatable primes in base 4 (written in decimal form).

Original entry on oeis.org

2, 3, 11, 13, 47, 53, 191
Offset: 1

Views

Author

Martin Renner, Jun 01 2007

Keywords

Comments

There are exactly 7 right truncatable primes in base 4.

Crossrefs

Showing 1-4 of 4 results.