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.

A341542 Numbers on the square spiral board that are enclosed by four primes.

This page as a plain text file.
%I A341542 #8 Feb 18 2021 00:47:45
%S A341542 12,72,1152,1452,1950,3672,5520,6660,8232,10302,10890,13218,15288,
%T A341542 15360,16062,18042,20898,21018,23628,25998,27918,32190,37812,42018,
%U A341542 42462,48858,55818,57192,80832,80910,83340,91368,97848,98640,104472,111492,117498,119550
%N A341542 Numbers on the square spiral board that are enclosed by four primes.
%C A341542 This sequence is similar to A172294, in which the starting number of the square spiral is 0 instead of 1. For a(n) < 10000000, 4 out of the 782 terms in this sequence, 72, 10302, 415380 and 1624350 are absent in A172294, while 6 out of the 784 terms in A172294, 42, 23562, 83232, 205662, 5805690 and 7019850 are absent in this sequence.
%C A341542 Conjecture: This sequence is infinite. If the conjecture holds, then the twin prime conjecture is true.
%C A341542 The 4 neighbors of n in the spiral are A068225, A068226, A334751, and A334752. - _Kevin Ryde_, Feb 13 2021
%o A341542 (Python)
%o A341542 from sympy import isprime
%o A341542 from math import sqrt, ceil
%o A341542 m, m_max = 2, 1000000
%o A341542 while m <= m_max:
%o A341542     L = [0, 0, 0, 0]
%o A341542     n = int(ceil((sqrt(m) + 1.0)/2.0))
%o A341542     z1 = 4*n*n - 12*n + 10
%o A341542     z2 = 4*n*n - 10*n + 7
%o A341542     z3 = 4*n*n - 8*n + 5
%o A341542     z4 = 4*n*n - 6*n + 3
%o A341542     z5 = 4*n*n - 4*n + 1
%o A341542     if m > z1 and m < z2: L = [m + 1, m - 8*n + 15, m - 1, m + 8*n - 7]
%o A341542     elif m > z2 and m < z3: L = [m + 8*n - 5, m + 1, m - 8*n + 13, m - 1]
%o A341542     elif m > z3 and m < z4: L = [m - 1, m + 8*n - 3, m + 1, m - 8*n + 11]
%o A341542     elif m > z4 and m < z5: L = [m - 8*n + 9, m - 1, m + 8*n - 1, m + 1]
%o A341542     if isprime(L[0]) == 1 and isprime(L[1]) == 1 and isprime(L[2]) == 1 and isprime(L[3]) == 1: print(m)
%o A341542     m += 2
%Y A341542 Cf. A341541, A341672, A172294, A068225, A068226, A334751, and A334752.
%K A341542 nonn
%O A341542 1,1
%A A341542 _Ya-Ping Lu_, Feb 13 2021