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.

Showing 1-3 of 3 results.

A036342 Prime concatenated analog clock numbers read clockwise.

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 67, 89, 4567, 23456789, 23456789101112123, 891011121234567891011, 23456789101112123456789101112123, 567891011121234567891011121234567891011, 121234567891011121234567891011121234567891011121, 91011121234567891011121234567891011121234567891011121234567
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1998

Keywords

Comments

The hours 10, 11 and 12 are taken 'complete and unreversed'.
a(28) has 1325 digits. - Michael S. Branicky, May 20 2024

Crossrefs

Programs

  • Python
    import heapq
    from sympy import isprime
    from itertools import islice
    def A036342_gen(): # generator of terms
        h = [(i, i) for i in range(1, 13)]
        while True:
            v, last = heapq.heappop(h)
            if isprime(v):
                yield v
            nxt = 1 if last == 12 else last+1
            shift = 10 if nxt < 10 else 100
            heapq.heappush(h, (v*shift+nxt, nxt))
    print(list(islice(A036342_gen(), 16))) # Michael S. Branicky, May 20 2024

Extensions

a(14)-a(15) from Jean-Marie Hachey, Oct 05 2016
Offset and data corrected by Sean A. Irvine, Oct 26 2020

A036344 Prime concatenated analog clock numbers (clockwise and counterclockwise).

Original entry on oeis.org

2, 3, 5, 7, 11, 23, 43, 67, 89, 109, 4567, 10987, 76543, 23456789, 6543211211, 4321121110987, 23456789101112123, 891011121234567891011, 3211211109876543211211, 23456789101112123456789101112123, 43211211109876543211211109876543, 567891011121234567891011121234567891011
Offset: 1

Views

Author

Patrick De Geest, Dec 15 1998

Keywords

Comments

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

Crossrefs

Formula

Union of A036342 and A036343. - Sean A. Irvine, Oct 26 2020

Extensions

Offset corrected and a(21) from Sean A. Irvine, Oct 26 2020
a(22) and beyond from Michael S. Branicky, May 20 2024

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

Original entry on oeis.org

2, 3, 5, 7, 11, 19, 43, 101, 211, 1019, 1987, 2111, 21211, 76543, 101987, 432121, 4321211, 12111019, 6543212111, 9876543212111, 1019876543212111019, 654321211101987654321211, 4321211101987654321211101, 6543212111019876543212111, 76543212111019876543212111019
Offset: 1

Views

Author

Keywords

Comments

In this version, the digits of 10, 11, and 12 may be split, in contrast to A036343.
a(47) has 1499 digits.

Crossrefs

Programs

  • PARI
    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
    A373045_upto_length(L)=concat([A373045_row(r)|r<-[1..L]]) \\ M. F. Hasler, May 21 2024
  • Python
    import heapq
    from sympy import isprime
    from itertools import islice
    def agen(): # generator of terms
        digits = [1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 0, 1, 1, 1, 2]
        h = [(digits[i], i) for i in range(len(digits))]
        found = set()
        while True:
            v, last = heapq.heappop(h)
            if v not in found and isprime(v):
                found.add(v)
                yield v
            nxt = (last-1)%len(digits)
            heapq.heappush(h, (v*10+digits[nxt], nxt))
    print(list(islice(agen(), 25))) # Michael S. Branicky, May 20 2024
    
Showing 1-3 of 3 results.