login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A235620 Primes whose base 9 representation also is the base 8 representation of a prime. 2
2, 3, 5, 7, 19, 41, 59, 97, 109, 131, 151, 277, 331, 347, 457, 491, 541, 547, 577, 601, 739, 761, 811, 829, 977, 997, 1031, 1231, 1279, 1303, 1321, 1499, 1549, 1571, 1609, 1621, 1801, 1987, 2221, 2239, 2269, 2309, 2381, 2399, 2521, 2617, 2687, 2707, 2791, 2939, 2953, 3119 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

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.

LINKS

Alois P. Heinz, Table of n, a(n) for n = 1..10000

M. F. Hasler, Primes whose base c expansion is also the base b expansion of a prime

EXAMPLE

19 is a term: 19 = 21_9 and 21_8 = 17, also a prime.

79 is not a term: 79 = 87_9 and 87 is not a valid base 8 representation.

MATHEMATICA

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 *)

PROG

(PARI) is(p, b=8, c=9)=vecmax(d=digits(p, c))<b&&isprime(vector(#d, i, b^(#d-i))*d~)&&isprime(p)

(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)

(PARI) isok(p) = isprime(p) && (q = digits(p, 9)) && (vecmax(q) < 8) && isprime(fromdigits(q, 8)); \\ Michel Marcus, Mar 12 2018

CROSSREFS

Cf. A231480, A235265, A235266, A152079, A235461 - A235482, A065720 - A065727, A235394, A235395, A089971A020449, A089981, A090707 - A091924, A235615 - A235639. See the LINK for further cross-references.

Sequence in context: A144561 A215156 A065724 * A289756 A236303 A117315

Adjacent sequences:  A235617 A235618 A235619 * A235621 A235622 A235623

KEYWORD

nonn,base

AUTHOR

M. F. Hasler, Jan 13 2014

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified August 12 23:19 EDT 2020. Contains 336440 sequences. (Running on oeis4.)