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!)
A246402 a(n) = smallest number k such that 2*(k*n)^n-1 is prime, or 0 if no such k exists. 1
2, 1, 1, 2, 2, 6, 3, 6, 3, 2, 5, 18, 22, 11, 5, 15, 30, 2, 34, 4, 52, 9, 27, 6, 30, 21, 14, 4, 14, 18, 18, 68, 60, 107, 81, 95, 193, 16, 111, 98, 2, 22, 97, 23, 9, 47, 24, 38, 166, 81, 29, 95, 98, 44, 235, 5, 2, 199, 705, 143, 417, 21, 42 (list; graph; refs; listen; history; text; internal format)
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
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
Sequence in context: A348291 A359652 A179974 * A114551 A191620 A214751
KEYWORD
nonn
AUTHOR
Pierre CAMI, Aug 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 July 17 23:27 EDT 2024. Contains 374377 sequences. (Running on oeis4.)