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.

A235620 Primes whose base-9 representation also is the base-8 representation of a prime.

This page as a plain text file.
%I A235620 #32 Jan 16 2022 23:23:37
%S A235620 2,3,5,7,19,41,59,97,109,131,151,277,331,347,457,491,541,547,577,601,
%T A235620 739,761,811,829,977,997,1031,1231,1279,1303,1321,1499,1549,1571,1609,
%U A235620 1621,1801,1987,2221,2239,2269,2309,2381,2399,2521,2617,2687,2707,2791,2939,2953,3119
%N A235620 Primes whose base-9 representation also is the base-8 representation of a prime.
%C A235620 This sequence is part of the two-dimensional array of sequences based on this same idea for any two different bases b, c > 1. Sequence A235265 and A235266 are the most elementary ones in this list. Sequences A089971, A089981 and A090707 through A090721, and sequences A065720 - A065727, follow the same idea with one base equal to 10.
%H A235620 Alois P. Heinz, <a href="/A235620/b235620.txt">Table of n, a(n) for n = 1..10000</a>
%H A235620 M. F. Hasler, <a href="https://docs.google.com/document/d/10IM7fcAbB2tqRGuwfGvuEGUzD_IXbgXPDK0tfxN4M3o/pub">Primes whose base c expansion is also the base b expansion of a prime</a>
%e A235620 19 is a term: 19 = 21_9 and 21_8 = 17, also a prime.
%e A235620 79 is not a term: 79 = 87_9 and 87 is not a valid base-8 representation.
%t A235620 b9b8pQ[n_]:=Module[{id=IntegerDigits[n,9]},Max[id]<8&&PrimeQ[FromDigits[ id,8]]]; Select[Prime[Range[500]],b9b8pQ] (* _Harvey P. Dale_, Mar 12 2018 *)
%o A235620 (PARI) is(p,b=8,c=9)=vecmax(d=digits(p,c))<b&&isprime(vector(#d,i,b^(#d-i))*d~)&&isprime(p)
%o A235620 (PARI) forprime(p=1,3e3,is(p,9,8)&&print1(vector(#d=digits(p,8),i,9^(#d-i))*d~,",")) \\ To produce the terms, this is more efficient than to select them using straightforwardly is(.)=is(.,8,9)
%o A235620 (PARI) isok(p) = isprime(p) && (q = digits(p, 9)) && (vecmax(q) < 8) && isprime(fromdigits(q, 8)); \\ _Michel Marcus_, Mar 12 2018
%Y A235620 Cf. A231480, A235265, A235266, A152079, A235461 - A235482, A065720 - A065727, A235394, A235395, A089971 ⊂ A020449, A089981, A090707 - A091924, A235615 - A235639. See the LINK for further cross-references.
%K A235620 nonn,base
%O A235620 1,1
%A A235620 _M. F. Hasler_, Jan 13 2014