The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
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!)
A248580 a(n) = the smallest triangular number T(k) such that n*T(k)-1 and n*T(k)+1 are twin primes or 0 if no solution exists for n; T(k) = A000217(k) = k-th triangular number. 2
6, 3, 6, 1, 6, 1, 6, 0, 0, 3, 78, 1, 66, 3, 10, 15, 6, 1, 78, 3, 300, 21, 6, 3, 6, 78, 10, 15, 210, 1, 378, 6, 6, 3, 66, 3, 1596, 6, 28, 6, 528, 1, 990, 15, 6, 3, 6, 66, 78, 3, 28, 6, 120, 15, 210, 105, 10, 6, 528, 1, 378, 21, 36, 3, 36, 3, 66, 15, 28, 6 (list; graph; refs; listen; history; text; internal format)
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.
LINKS
FORMULA
a(n) = A000217(A248579(n)).
EXAMPLE
a(5) = 6 because 6 is the smallest smallest triangular number with this property: 5*6 -+ 1 = 29 and 31 (twin primes).
MATHEMATICA
a248580[n_Integer] := Catch@Module[{T, k}, T[i_] := i (i + 1)/2; Do[If[And[PrimeQ[n*T[k] + 1], PrimeQ[n*T[k] - 1]], Throw[T[k]], 0], {k, 1, 10^4}] /. Null -> 0]; a248580 /@ Range[70] (* Michael De Vlieger, Nov 12 2014 *)
PROG
(Magma) A248580:=func<n|exists(r){m*(m+1)/2: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>; [A248580(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*(k+1)/2; } \\ Michel Marcus, Nov 12 2014
CROSSREFS
Sequence in context: A019151 A367976 A143506 * A008567 A233700 A195436
KEYWORD
nonn
AUTHOR
Jaroslav Krizek, Oct 25 2014
STATUS
approved

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 16 08:15 EDT 2024. Contains 372549 sequences. (Running on oeis4.)