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.

A099678 Numbers n such that 10n01 is a prime.

This page as a plain text file.
%I A099678 #11 Mar 16 2017 22:13:39
%S A099678 3,5,6,15,17,20,21,23,27,30,38,47,48,54,56,57,65,68,71,72,83,84,90,92,
%T A099678 102,105,110,116,122,126,134,135,143,155,156,162,164,173,182,183,197,
%U A099678 198,200,201,203,204,210,213,222,225,227,231,233,236,249,261,264,270,281,282,290
%N A099678 Numbers n such that 10n01 is a prime.
%H A099678 Robert Israel, <a href="/A099678/b099678.txt">Table of n, a(n) for n = 1..10000</a>
%p A099678 t0:=[]; u0:=[]; for n from 0 to 500 do p0:="10"; p1:="01"; t1:=cat(p0,n,p1); t1:=convert(t1,decimal,10); if isprime(t1) then t0:=[op(t0),n]; u0:=[op(u0),t1]; fi; od: t0;
%p A099678 # Alternative:
%p A099678 filter:= n -> isprime( 10^(ilog10(n)+4)+100*n+1):
%p A099678 select(filter, [$1..1000]); # _Robert Israel_, Mar 16 2017
%t A099678 Select[ Range[280], PrimeQ[ FromDigits[Join[{1, 0}, IntegerDigits[ # ], {0, 1}]]] &] (* _Robert G. Wilson v_, Nov 20 2004 *)
%o A099678 (PARI) isok(n) = isprime(eval(concat(concat("10", n), "01"))); \\ _Michel Marcus_, Jul 29 2015
%Y A099678 Cf. A032672, A100502 (for the primes).
%K A099678 nonn,base
%O A099678 1,1
%A A099678 _N. J. A. Sloane_, Nov 19 2004