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

A309749 Primes p such that the base-10 concatenations (p+1)||p and (p+1)||(p+1)||p are both prime.

Original entry on oeis.org

3, 197, 263, 281, 443, 881, 887, 947, 2111, 2129, 2237, 2699, 2741, 2897, 3251, 3539, 3821, 3881, 4049, 4451, 4523, 4787, 6257, 6389, 8609, 8741, 10163, 10193, 10247, 11027, 13187, 14591, 14897, 16193, 16901, 17027, 18797, 19319, 19379, 20147, 20681, 21563, 21647, 22073, 22259
Offset: 1

Views

Author

Robert Israel, Aug 26 2019

Keywords

Comments

a(n) == 5 (mod 6) for n >= 2.

Examples

			a(3) = 263 is in the sequence because 263, 264263 and 264264263 are all prime.
		

Crossrefs

Cf. A309935.

Programs

  • Magma
    [p:p in PrimesUpTo(23000)|IsPrime(Seqint(Intseq(p) cat Intseq(p+1))) and IsPrime(Seqint(Intseq(p) cat Intseq(p+1) cat Intseq(p+1)))]; // Marius A. Burtea, Aug 27 2019
  • Maple
    filter:= proc(n) local v,w,q;
      if not isprime(n) then return false fi;
      v:= 10^(1+ilog10(n));
      q:= v*(n+1)+n;
      if not isprime(q) then return false fi;
      isprime((10^(1+ilog10(q))+v)*(n+1)+n)
    end proc:
    select(filter, [3,seq(i,i=5..100000,6)]);
  • Mathematica
    pcQ[n_]:=Module[{idn=IntegerDigits[n],idn2=IntegerDigits[n+1]}, AllTrue[ {FromDigits[ Join[ idn2,idn]],FromDigits[ Join[idn2,idn2,idn]]},PrimeQ]]; Select[Prime[Range[2500]],pcQ] (* The program uses the AllTrue function from Mathematica version 10 *) (* Harvey P. Dale, Sep 11 2019 *)

A309934 Primes p such that p+2, (p+1)||p and (p+1)||(p+2) are primes (where || denotes concatenation in base 10).

Original entry on oeis.org

41, 101, 107, 179, 191, 269, 311, 419, 521, 659, 821, 881, 1229, 1481, 4241, 4787, 8819, 10331, 11549, 13691, 14549, 14561, 14867, 15731, 17909, 18521, 20549, 21647, 22619, 23669, 23831, 26261, 27737, 35837, 38921, 39041, 40127, 42017, 43961, 44531, 46439, 47711, 48119, 48821
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Aug 23 2019

Keywords

Examples

			a(3)=107 is in the sequence because 107, 109, 108107 and 108109 are primes.
		

Crossrefs

Programs

  • Magma
    [p:p in PrimesUpTo(2200)|IsPrime(p+2) and IsPrime(Seqint(Intseq(p) cat Intseq(p+1))) and IsPrime(Seqint(Intseq(p+2) cat Intseq(p+1)))]; // Marius A. Burtea, Aug 23 2019
    
  • Maple
    Res:= {}:
    for d from 1 to 6 do
      P:= select(isprime,{seq(i,i=10^(d-1)+1..10^d,2)});
      T:= P intersect map(`-`,P,2);
      Res:= Res union select(p -> isprime((10^d+1)*p+10^d) and isprime((10^d+1)*p+10^d+2), T);
    od:
    sort(convert(Res,list));
  • Mathematica
    cm[{a_,b_}]:=Module[{m=(a+b)/2,il},il=IntegerLength[m];AllTrue[m*10^il+{a,b},PrimeQ]]; Select[ Partition[Prime[Range[5100]],2,1],#[[2]]-#[[1]]==2&&cm[#]&][[;;,1]] (* Harvey P. Dale, Feb 17 2024 *)
  • PARI
    isok(k) = isprime(k) && isprime(k+2) && isprime(eval(Str(k+1, k))) && isprime(eval(Str(k+1, k+2))); \\ Jinyuan Wang, Aug 26 2019

A330699 Primes p such that the base-10 concatenation p||(p+1)||p is prime.

Original entry on oeis.org

7, 11, 13, 37, 41, 47, 59, 61, 71, 79, 83, 101, 103, 149, 181, 191, 193, 229, 241, 307, 317, 347, 359, 373, 383, 409, 439, 467, 487, 509, 569, 691, 823, 839, 857, 907, 941, 1061, 1069, 1091, 1109, 1123, 1181, 1193, 1303, 1423, 1447, 1487, 1499, 1579, 1601, 1697, 1777, 1831, 1871, 1931, 1949, 1979
Offset: 1

Views

Author

Robert Israel, Dec 26 2019

Keywords

Examples

			a(3)=13 is a member because 13 and 131413 are primes.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local d; d:=10^(ilog10(n)+1);
       n*(d^2+d+1)+d
    end proc:
    select(t -> isprime(t) and isprime(f(t)), [seq(i,i=3..10000,2)]);
Showing 1-3 of 3 results.