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.

This page as a plain text file.
%I A352424 #18 Apr 18 2024 06:11:00
%S A352424 14720439,16535628,34714710,40741208,61436388,603346308,1172360113,
%T A352424 1368156941,1574100889,1924496102,1989253499,2021860243,6774546339,
%U A352424 9770541610,12230855963,12311606487,12540842446,14513723777,26423329489,38648724198,47638558043,50195886916,50811319931,56449248367
%N A352424 Numbers that can be written as sums of squares of consecutive primes in two ways.
%H A352424 Michael S. Branicky, <a href="/A352424/b352424.txt">Table of n, a(n) for n = 1..991</a>
%H A352424 Cathal O'Sullivan, Jonathan P. Sorenson, and Aryn Stahl, <a href="https://arxiv.org/abs/2204.10930">An Algorithm to Find Sums of Consecutive Powers of Primes</a>, arXiv:2204.10930 [math.NT], 2022-2023. See 4.2 Duplicates p. 8-9.
%H A352424 Michael S. Branicky, <a href="/A352424/a352424.py.txt">Python Program</a>
%o A352424 (Python) # see link for a version suitable for producing b-file
%o A352424 from sympy import primerange, integer_nthroot
%o A352424 def aupto(limit):
%o A352424     adict = dict()
%o A352424     rootlimit = integer_nthroot(limit, 2)[0]
%o A352424     for x in primerange(2, rootlimit+1):
%o A352424         s = x**2
%o A352424         adict[s] = 1
%o A352424         for y in primerange(x+1, rootlimit+1):
%o A352424             s += y**2
%o A352424             if s <= limit:
%o A352424                 if s not in adict:
%o A352424                     adict[s] = 1
%o A352424                 else:
%o A352424                     adict[s] += 1
%o A352424             else:
%o A352424                 break
%o A352424     return sorted(s for s in adict if adict[s] == 2)
%o A352424 print(aupto(6*10**10)) # _Michael S. Branicky_, Apr 26 2022
%Y A352424 Cf. A001248, A340771.
%K A352424 nonn
%O A352424 1,1
%A A352424 _Michel Marcus_, Apr 26 2022