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.

A373045 Prime concatenated analog clock numbers read counterclockwise. Version 2: hours > 9 may be split into individual digits.

This page as a plain text file.
%I A373045 #17 May 21 2024 11:13:43
%S A373045 2,3,5,7,11,19,43,101,211,1019,1987,2111,21211,76543,101987,432121,
%T A373045 4321211,12111019,6543212111,9876543212111,1019876543212111019,
%U A373045 654321211101987654321211,4321211101987654321211101,6543212111019876543212111,76543212111019876543212111019
%N A373045 Prime concatenated analog clock numbers read counterclockwise. Version 2: hours > 9 may be split into individual digits.
%C A373045 In this version, the digits of 10, 11, and 12 may be split, in contrast to A036343.
%C A373045 a(47) has 1499 digits.
%H A373045 Michael S. Branicky, <a href="/A373045/b373045.txt">Table of n, a(n) for n = 1..46</a>
%H A373045 Eric Angelini, <a href="https://cinquantesignes.blogspot.com/2024/05/philip-gustons-primes.html">Philip Guston's primes</a>
%H A373045 Tiziano Mosconi, in reply to Carlos Rivera, <a href="https://www.primepuzzles.net/puzzles/puzz_019.htm">Puzzle 19: Primes on a clock</a>, primepuzzles.net, Aug 13 2001.
%o A373045 (Python)
%o A373045 import heapq
%o A373045 from sympy import isprime
%o A373045 from itertools import islice
%o A373045 def agen(): # generator of terms
%o A373045     digits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 1, 1, 1, 2]
%o A373045     h = [(digits[i], i) for i in range(len(digits))]
%o A373045     found = set()
%o A373045     while True:
%o A373045         v, last = heapq.heappop(h)
%o A373045         if v not in found and isprime(v):
%o A373045             found.add(v)
%o A373045             yield v
%o A373045         nxt = (last-1)%len(digits)
%o A373045         heapq.heappush(h, (v*10+digits[nxt], nxt))
%o A373045 print(list(islice(agen(), 25))) # _Michael S. Branicky_, May 20 2024
%o A373045 (PARI)
%o A373045 A373045_row(r)={my(d=concat([digits(i)|i<-[1..12]]), p); Set([p| s<-[1..#d], d[s]&& isprime(p=fromdigits([d[(s-i)%#d+1]| i<-[1..r]]))])}\\ r-digit-terms
%o A373045 A373045_upto_length(L)=concat([A373045_row(r)|r<-[1..L]]) \\ _M. F. Hasler_, May 21 2024
%Y A373045 Cf. A036343, A373044.
%K A373045 nonn,base
%O A373045 1,1
%A A373045 _Eric Angelini_ and _Michael S. Branicky_, May 20 2024