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.

A235126 Primes whose base-10 representation also represents a prime in base 17.

This page as a plain text file.
%I A235126 #14 Apr 25 2017 15:40:58
%S A235126 2,3,5,7,23,29,43,61,67,83,137,139,191,197,227,241,263,313,331,461,
%T A235126 577,593,599,607,683,739,821,863,937,953,1013,1033,1039,1051,1297,
%U A235126 1303,1327,1459,1619,1693,1721,1787,1811,1877,1949
%N A235126 Primes whose base-10 representation also represents a prime in base 17.
%C A235126 See A090713 for a similar sequence whose definition works "in the opposite direction".
%H A235126 Robert Israel, <a href="/A235126/b235126.txt">Table of n, a(n) for n = 1..10000</a>
%e A235126 The decimal representation of prime 23, considered as a number written in base 17, stands for 2*17+3 = 37, which is also prime, therefore 23 is in the sequence.
%p A235126 filter:= proc(p) local L;
%p A235126   if not isprime(p) then return false fi;
%p A235126   L:= convert(p,base,10);
%p A235126   isprime(add(L[i]*17^(i-1),i=1..nops(L)))
%p A235126 end proc:
%p A235126 select(filter, [2,seq(i,i=3..10000,2)]); # _Robert Israel_, Apr 25 2017
%t A235126 Select[Prime@ Range@ 300, PrimeQ@ FromDigits[IntegerDigits@ #, 17] &] (* _Michael De Vlieger_, Jan 03 2016 *)
%o A235126 (PARI) is(p, b=17)={my(d=digits(p)); isprime(vector(#d, i, b^(#d-i))*d~)&&isprime(p)} \\ This code allows the production of similar sequences for other bases b > 9 (which can be given as an optional 2nd argument), but does not do the required check for bases b < 10.
%Y A235126 Cf. A235110 and other sequences in the range A090707 - A091924.
%K A235126 nonn,base
%O A235126 1,1
%A A235126 _M. F. Hasler_, Jan 03 2014