OFFSET
1,1
COMMENTS
For n = 8 and 9 there are no triangular numbers T(k) such that n*T(k) +/- 1 are twin primes.
a(8) = 0 because 8*T(k) + 1 = A016754(k) = composite number for k >= 1.
a(9) = 0 because 9*T(k) + 1 = A060544(k+1) = composite number for k >= 1.
Are there numbers n > 9 such that a(n) = 0? If a(n) = 0 for n > 9, n must be bigger than 4000.
a(n) > 0 for 10 <= n <= 100000. - Robert Israel, Aug 10 2023
LINKS
Robert Israel, Table of n, a(n) for n = 1..10000
EXAMPLE
a(5) = 3 because 3 is the smallest number k with this property: 5*T(3) -/+ 1 = 5*6 -+ 1 = 29 and 31 (twin primes).
MAPLE
f:= proc(n) local k;
for k from 1 do if isprime(n*k*(k+1)/2+1) and isprime(n*k*(k+1)/2-1) then return k fi od:
end proc;
f(8):= 8: f(9):= 0:
map(f, [$1..100]); # Robert Israel, Aug 10 2023
PROG
(Magma) A248579:=func<n|exists(r){m:m in[1..1000000] | IsPrime(n*m*(m+1) div 2+1) and IsPrime(n*m*(m+1) div 2-1)}select r else 0>; [A248579(n): n in[1..100]]
(PARI) a(n) = {if ((n==8) || (n==9), return (0)); k = 1; while (!isprime(n*k*(k+1)/2-1) || !isprime(n*k*(k+1)/2+1), k++); k; } \\ Michel Marcus, Nov 05 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Oct 25 2014
STATUS
approved