login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A134971 Canyon primes. 9
101, 313, 727, 757, 919, 929, 3023, 3203, 7027, 7057, 7127, 7207, 7237, 7247, 7307, 7417, 7457, 7507, 7517, 7537, 7547, 7607, 9029, 9049, 9059, 9109, 9209, 9239, 9319, 9349, 9419, 9439, 9479, 9539, 9619, 9629, 9649, 9679, 9689, 9719, 9739, 9749, 9769, 9829 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,1

COMMENTS

Intersection of prime numbers and Canyon numbers ("Canyon primes"). This sequence is finite because A134970 is. There are 9237 Canyon primes (compare to 116505 Canyon numbers total). The largest Canyon prime (and last element of this sequence) is a(9237) = 98765432101456789.

LINKS

Kellen Myers, Table of n, a(n) for n = 1..9237

FORMULA

A000040 INTERSECT A134970.

EXAMPLE

Illustration of 751367 as a Canyon prime:

. . . . . .

. . . . . .

7 . . . . 7

. . . . 6 .

. 5 . . . .

. . . . . .

. . . 3 . .

. . . . . .

. . 1 . . .

. . . . . .

MATHEMATICA

S = {}; c = 1;

For[n = 1, n <= 9, n++,

L = 2 n - 1;

d = Join[Reverse[Range[1, n - 1]], Range[0, n - 1]];

If[Mod[n, 2] != 0 && n != 5,

For[j = 1, j < 2^L, j++,

Dig = d[[Map[#[[1]] &, Position[IntegerDigits[j, 2, L], 1]]]];

min = Min[Dig];

If[Length[Position[Dig, min]] == 1,

p = FromDigits[Join[{n}, Dig, {n}]];

If[PrimeQ[p], S = Append[S, p]];

];

];

];

]; (* Kellen Myers, Jan 18 2011 *)

PROG

(Python)

from sympy import isprime

from itertools import chain, combinations as combs

ups = list(chain.from_iterable(combs(range(10), r) for r in range(2, 11)))

s = set(L[::-1] + R[1:] for L in ups for R in ups if L[0] == R[0])

afull = sorted(filter(isprime, (int("".join(map(str, t))) for t in s if t[0] == t[-1])))

print(afull[:44]) # Michael S. Branicky, Jan 16 2023

CROSSREFS

Cf. A000040, A134951, Primes in A134970.

Sequence in context: A256048 A252942 A090287 * A082770 A161907 A195855

Adjacent sequences: A134968 A134969 A134970 * A134972 A134973 A134974

KEYWORD

nonn,base,fini,full

AUTHOR

Omar E. Pol, Nov 25 2007

EXTENSIONS

All terms past 3203, more comments, etc. by Kellen Myers, Jan 18 2011

STATUS

approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 1 09:24 EDT 2023. Contains 361688 sequences. (Running on oeis4.)