login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Prime concatenated analog clock numbers read clockwise.
4

%I #34 May 21 2024 05:28:42

%S 2,3,5,7,11,23,67,89,4567,23456789,23456789101112123,

%T 891011121234567891011,23456789101112123456789101112123,

%U 567891011121234567891011121234567891011,121234567891011121234567891011121234567891011121,91011121234567891011121234567891011121234567891011121234567

%N Prime concatenated analog clock numbers read clockwise.

%C The hours 10, 11 and 12 are taken 'complete and unreversed'.

%C a(28) has 1325 digits. - _Michael S. Branicky_, May 20 2024

%H Michael S. Branicky, <a href="/A036342/b036342.txt">Table of n, a(n) for n = 1..27</a> (terms 1..25 from Sean A. Irvine)

%H Carlos Rivera, <a href="http://www.primepuzzles.net/puzzles/puzz_019.htm">Puzzle 19. Primes on a clock</a>, The Prime Puzzles & Problems Connection.

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/ClockPrime.html">Clock Prime</a>.

%o (Python)

%o import heapq

%o from sympy import isprime

%o from itertools import islice

%o def A036342_gen(): # generator of terms

%o h = [(i, i) for i in range(1, 13)]

%o while True:

%o v, last = heapq.heappop(h)

%o if isprime(v):

%o yield v

%o nxt = 1 if last == 12 else last+1

%o shift = 10 if nxt < 10 else 100

%o heapq.heappush(h, (v*shift+nxt, nxt))

%o print(list(islice(A036342_gen(), 16))) # _Michael S. Branicky_, May 20 2024

%Y Cf. A034326, A036343, A036344.

%K nonn,base

%O 1,1

%A _Patrick De Geest_, Dec 15 1998

%E a(14)-a(15) from _Jean-Marie Hachey_, Oct 05 2016

%E Offset and data corrected by _Sean A. Irvine_, Oct 26 2020