OFFSET
1,2
COMMENTS
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..387
EXAMPLE
Also a(389) = 0 (presumably), whereas subsequent terms (n > 389) are > 0:
393,443,421,350,397,455,368,433,387,352,356,382,384,366,372,392,374, ...
with corresponding odd primes:
2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777, ...
MATHEMATICA
maxm = 3000;
A075321p[n_] := A075321p[n] = Module[{prevlist, i, p, q}, If[n == 1, Return[{3, 5}], prevlist = Array[A075321p, n-1] // Flatten]; For[i = 2, True, i++, p = Prime[i]; If[FreeQ[prevlist, p], q = p + 2*n; If[ PrimeQ[q] && FreeQ[prevlist, q], Return[{p, q}]]]]];
A075323[n_] := If[OddQ[n], A075321p[(n + 1)/2][[1]], A075321p[n/2][[2]]];
a[n_] := For[m = 1, m <= maxm, m++, If[A075323[m] == Prime[n + 1], Return[m]]] /. Null -> 0;
Array[a, 387] (* Jean-François Alcover, Feb 12 2018, after R. J. Mathar's program for A075321p *)
PROG
(Haskell)
import Data.List (elemIndex); import Data.Maybe (fromJust)
a247233 = (+ 1) . fromJust . (`elemIndex` a075323_list) . a065091
CROSSREFS
KEYWORD
nonn
AUTHOR
Reinhard Zumkeller, Nov 29 2014
STATUS
approved