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.

A036343 Prime concatenated analog clock numbers read counterclockwise.

This page as a plain text file.
%I A036343 #40 Feb 16 2025 08:32:37
%S A036343 2,3,5,7,11,43,109,10987,76543,6543211211,4321121110987,
%T A036343 3211211109876543211211,43211211109876543211211109876543,
%U A036343 9876543211211109876543211211109876543211211109876543211211
%N A036343 Prime concatenated analog clock numbers read counterclockwise.
%C A036343 The hours 10, 11 and 12 are taken 'complete and unreversed'.
%C A036343 a(19) has 1139 digits. - _Michael S. Branicky_, May 20 2024
%H A036343 Sean A. Irvine, <a href="/A036343/b036343.txt">Table of n, a(n) for n = 1..18</a>
%H A036343 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 A036343 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/ClockPrime.html">Clock Prime</a>.
%o A036343 (Python)
%o A036343 import heapq
%o A036343 from sympy import isprime
%o A036343 from itertools import islice
%o A036343 def A036343_gen(): # generator of terms
%o A036343     h = [(i, i) for i in range(1, 13)]
%o A036343     while True:
%o A036343         v, last = heapq.heappop(h)
%o A036343         if isprime(v):
%o A036343             yield v
%o A036343         nxt = 12 if last == 1 else last-1
%o A036343         shift = 10 if nxt < 10 else 100
%o A036343         heapq.heappush(h, (v*shift+nxt, nxt))
%o A036343 print(list(islice(A036343_gen(), 16))) # _Michael S. Branicky_, May 20 2024
%Y A036343 Cf. A034326, A036342, A036344.
%K A036343 nonn,base
%O A036343 1,1
%A A036343 _Patrick De Geest_, Dec 15 1998
%E A036343 Offset corrected by _Sean A. Irvine_, Oct 26 2020