login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A248579 a(n) = the smallest numbers k such that n*T(k)-1 and n*T(k)+1 are twin primes or 0 if no solution exists for n where T(k) = A000217(k) = k-th triangular number. 2

%I #14 Aug 12 2023 00:43:25

%S 3,2,3,1,3,1,3,0,0,2,12,1,11,2,4,5,3,1,12,2,24,6,3,2,3,12,4,5,20,1,27,

%T 3,3,2,11,2,56,3,7,3,32,1,44,5,3,2,3,11,12,2,7,3,15,5,20,14,4,3,32,1,

%U 27,6,8,2,8,2,11,5,7,3,167,1,20,9,12,2,3,18

%N a(n) = the smallest numbers k such that n*T(k)-1 and n*T(k)+1 are twin primes or 0 if no solution exists for n where T(k) = A000217(k) = k-th triangular number.

%C For n = 8 and 9 there are no triangular numbers T(k) such that n*T(k) +/- 1 are twin primes.

%C a(8) = 0 because 8*T(k) + 1 = A016754(k) = composite number for k >= 1.

%C a(9) = 0 because 9*T(k) + 1 = A060544(k+1) = composite number for k >= 1.

%C Are there numbers n > 9 such that a(n) = 0? If a(n) = 0 for n > 9, n must be bigger than 4000.

%C a(n) > 0 for 10 <= n <= 100000. - _Robert Israel_, Aug 10 2023

%H Robert Israel, <a href="/A248579/b248579.txt">Table of n, a(n) for n = 1..10000</a>

%e 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).

%p f:= proc(n) local k;

%p 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:

%p end proc;

%p f(8):= 8: f(9):= 0:

%p map(f, [$1..100]); # _Robert Israel_, Aug 10 2023

%o (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]]

%o (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

%Y Cf. A000217, A016754, A060544, A248580.

%Y a(n) = 1: A014574.

%K nonn

%O 1,1

%A _Jaroslav Krizek_, Oct 25 2014

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 2 07:19 EDT 2024. Contains 372178 sequences. (Running on oeis4.)