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.

A352424 Numbers that can be written as sums of squares of consecutive primes in two ways.

Original entry on oeis.org

14720439, 16535628, 34714710, 40741208, 61436388, 603346308, 1172360113, 1368156941, 1574100889, 1924496102, 1989253499, 2021860243, 6774546339, 9770541610, 12230855963, 12311606487, 12540842446, 14513723777, 26423329489, 38648724198, 47638558043, 50195886916, 50811319931, 56449248367
Offset: 1

Views

Author

Michel Marcus, Apr 26 2022

Keywords

Crossrefs

Programs

  • Python
    # see link for a version suitable for producing b-file
    from sympy import primerange, integer_nthroot
    def aupto(limit):
        adict = dict()
        rootlimit = integer_nthroot(limit, 2)[0]
        for x in primerange(2, rootlimit+1):
            s = x**2
            adict[s] = 1
            for y in primerange(x+1, rootlimit+1):
                s += y**2
                if s <= limit:
                    if s not in adict:
                        adict[s] = 1
                    else:
                        adict[s] += 1
                else:
                    break
        return sorted(s for s in adict if adict[s] == 2)
    print(aupto(6*10**10)) # Michael S. Branicky, Apr 26 2022