OFFSET
1,1
COMMENTS
All primes 2*(a(n)*n)^n-1 are certified primes for n=1 to 1500.
I conjecture that k exists for every n.
As N increases the ratio (sum k for n=1 to N)/(sum n for n=1 to N ) tends to 4.11, so in average k~4.1*n.
From Robert G. Wilson v, Sep 16 2014: (Start)
First appearance of k or 0 if not yet present: 2, 1, 7, 20, 11, 6, 78, 0, 22, 111, 14, 279, 0, 27, 16, …, .
Increasingly larger terms (records): 2, 6, 18, 22, 30, 34, 52, 68, 107, 193, 235, 705, 1691, 1898, 2150, 2157, 4766, 5654, 9681, 9897, 18384, 18873, 22885, 31044, 31284, 37180, 37935, …, .
Increasingly larger terms (records) by index: 1, 6, 12, 13, 17, 19, 21, 32, 34, 37, 55, 59, 83, 126, 144, 184, 197, 227, 371, 427, 433, 751, 775, 827, 1121, 1201, 1403, …, . (End)
LINKS
Pierre CAMI, Table of n, a(n) for n = 1..1515
EXAMPLE
2*(2*1)^1-1=3 prime so a(1)=2.
2*(1*2)^2-1=7 prime so a(2)=1.
MATHEMATICA
f[n_] := Block[{k = 1}, While[ !PrimeQ[ 2(k*n)^n - 1], k++]; k]; Array[f, 100] (* Robert G. Wilson v, Sep 16 2014 *)
PROG
(PFGW & SCRIPT)
SCRIPT
DIM k
DIM n, 0
OPENFILEOUT myf, a(n).txt
LABEL loop1
SET n, n+1
SET k, 0
LABEL loop2
SET k, k+1
PRP 2*(k*n)^n-1, t
IF ISPRP then GOTO a
GOTO loop2
LABEL a
WRITE myf, k
GOTO loop1
(PARI) a(n) = k=1; while(!ispseudoprime(2*(k*n)^n-1), k++); k \\ Colin Barker, Aug 25 2014
CROSSREFS
KEYWORD
nonn
AUTHOR
Pierre CAMI, Aug 25 2014
STATUS
approved