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.

A024782 Every suffix prime and no 0 digits in base 7 (written in base 7).

Original entry on oeis.org

2, 3, 5, 23, 25, 32, 43, 52, 65, 443, 452, 623, 625, 632, 652, 2452, 2623, 6625, 6652, 42623, 642623, 6642623
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    a:=[[2], [3], [5]]: b:=[]: l1:=1: l2:=3: do for k from 1 to 6 do for j from l1 to l2 do d:=[op(a[j]),k]: if(isprime(op(convert(d, base, 7, 7^nops(d)))))then a:=[op(a), d]: fi: od: od: l1:=l2+1: l2:=nops(a): if(l1>l2)then break: fi: od: seq(op(convert(a[j], base, 10, 10^nops(a[j]))), j=1..nops(a)); # Nathaniel Johnston, Jun 21 2011
  • Python
    from sympy import isprime
    def afull():
        prime_strings, alst = list("235"), []
        while len(prime_strings) > 0:
            alst.extend(sorted(int(p) for p in prime_strings))
            candidates = set(d+p for p in prime_strings for d in "123456")
            prime_strings = [c for c in candidates if isprime(int(c, 7))]
        return alst
    print(afull()) # Michael S. Branicky, Apr 27 2022