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.

A324669 a(n) is the least k>0 such that A001359(n)+k^2 is in A001359.

This page as a plain text file.
%I A324669 #26 Sep 04 2019 01:55:38
%S A324669 6,114,162,210,24,330,6,6,18,12,30,210,6,18,120,150,330,24,6,42,30,66,
%T A324669 96,210,180,210,42,54,60,360,6,18,630,60,210,24,30,66,24,126,30,48,
%U A324669 1380,24,90,102,6,30,42,18,90,90,42,54,12,36,60,186,210,12,72,24,42,24,330,60,12
%N A324669 a(n) is the least k>0 such that A001359(n)+k^2 is in A001359.
%C A324669 Offset is 2 because 3+k^2 is never in A001359.
%C A324669 All terms are divisible by 6.
%C A324669 The generalized Bunyakovsky conjecture implies that a(n) always exists, for n >= 2.
%C A324669 a(n) = 6 if and only if A001359(n) is in A248367.
%H A324669 Robert Israel, <a href="/A324669/b324669.txt">Table of n, a(n) for n = 2..10000</a>
%e A324669 a(3) = 114 because A001359(3)=11, 11+114^2=13007 is in A001359, and no smaller k works.
%p A324669 P:= select(isprime, {seq(i,i=3..10000,2)}):
%p A324669 TP:= sort(convert(P intersect map(`-`,P,2),list)):
%p A324669 f:= proc(p) local k;
%p A324669 for k from 6 by 6 do if isprime(p + k^2) and isprime(p + k^2 + 2) then return k fi od
%p A324669 end proc:
%p A324669 map(f, TP[2..-1]);
%t A324669 With[{s = Select[Prime@ Range[3, 332], PrimeQ[# + 2] &]}, Array[Block[{k = 1}, While[! AllTrue[s[[#]] + k^2 + {0, 2}, PrimeQ], k++]; k] &, Length@ s]] (* _Michael De Vlieger_, Sep 03 2019 *)
%Y A324669 Cf. A001359, A248367.
%K A324669 nonn
%O A324669 2,1
%A A324669 _J. M. Bergot_ and _Robert Israel_, Sep 03 2019