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-2 of 2 results.

A068712 Primes of the form 5*2^k + 3.

Original entry on oeis.org

13, 23, 43, 83, 163, 643, 1283, 10243, 20483, 1310723, 5242883, 335544323, 1342177283, 21474836483, 85899345923, 43980465111043, 87960930222083, 5629499534213123, 22517998136852483, 1441151880758558723
Offset: 1

Views

Author

Amarnath Murthy, Mar 05 2002

Keywords

Examples

			1283 is a term as a concatenation of 2^7 and 3.
		

Crossrefs

Programs

  • Magma
    [a: n in [1..100] | IsPrime(a) where a is 5*2^n + 3]; // Vincenzo Librandi, Dec 08 2011
  • Mathematica
    Select[5*2^Range[60]+3, PrimeQ]  (* Harvey P. Dale, Feb 04 2011 *)
  • PARI
    for(n=1,150, if(isprime(2^n*5+3)==1,print1(2^n*5+3,",")))
    

Extensions

More terms from Benoit Cloitre, Mar 09 2002

A354524 Primes p such that p+1 is the concatenation of a power of 3 and a power of 2.

Original entry on oeis.org

11, 13, 17, 31, 37, 97, 131, 163, 271, 277, 331, 811, 1511, 2437, 2731, 3511, 7297, 9127, 9511, 18191, 21871, 27127, 65617, 72931, 196831, 196837, 278191, 332767, 729511, 812047, 1262143, 1524287, 1968331, 2187511, 5314411, 5314417, 5904931, 6561127, 7298191, 15943237, 47829697, 53144131
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 16 2022

Keywords

Examples

			a(5) = 97 is a term because it is prime and 97 + 1 = 98 is the concatenation of 3^2 = 9 and 2^3 = 8.
		

Crossrefs

Cf. A068801. Contains A068715.

Programs

  • Maple
    M:= 10: # for terms with <= M digits
    R:= NULL:
    for i from 0 while 3^i < 10^(M-1) do
      d:= 1+ilog10(3^i);
      for j from 1 while 2^j < 10^(M-d) do
        x:= dcat(3^i,2^j)-1;
        if isprime(x) then R:= R,x fi
    od od:
    sort([R]);
  • Python
    from sympy import isprime
    from itertools import count, takewhile
    def auptod(digits):
        M = 10**digits
        pows2 = list(takewhile(lambda x: x < M , (2**a for a in count(0))))
        pows3 = list(takewhile(lambda x: x < M , (3**b for b in count(0))))
        strs2, strs3 = list(map(str, pows2)), list(map(str, pows3))
        concat = (int(s3+s2) for s3 in strs3 for s2 in strs2)
        return sorted(set(t-1 for t in concat if t < M and isprime(t-1)))
    print(auptod(10)) # Michael S. Branicky, Aug 16 2022
Showing 1-2 of 2 results.