A324669 a(n) is the least k>0 such that A001359(n)+k^2 is in A001359.
6, 114, 162, 210, 24, 330, 6, 6, 18, 12, 30, 210, 6, 18, 120, 150, 330, 24, 6, 42, 30, 66, 96, 210, 180, 210, 42, 54, 60, 360, 6, 18, 630, 60, 210, 24, 30, 66, 24, 126, 30, 48, 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
Offset: 2
Keywords
Examples
a(3) = 114 because A001359(3)=11, 11+114^2=13007 is in A001359, and no smaller k works.
Links
- Robert Israel, Table of n, a(n) for n = 2..10000
Programs
-
Maple
P:= select(isprime, {seq(i,i=3..10000,2)}): TP:= sort(convert(P intersect map(`-`,P,2),list)): f:= proc(p) local k; for k from 6 by 6 do if isprime(p + k^2) and isprime(p + k^2 + 2) then return k fi od end proc: map(f, TP[2..-1]);
-
Mathematica
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 *)
Comments