Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
A082469
If n==1 or mod(n,2)==0 or mod(n,5)==0 then -1, otherwise a(n) is the smallest nonnegative integer k such that the concatenation 1(k)2(k)3(k)...(k)n is a prime.
1
-1, -1, 1, -1, -1, -1, 2, -1, 2, -1, 35, -1, 1, -1, -1, -1, 7, -1, 147, -1, 35, -1, 49, -1, -1, -1, 10, -1, 131, -1, 71, -1, 109, -1, -1, -1, 62, -1, 43, -1, 122, -1, 103, -1, -1, -1, 7, -1, 91, -1, 74, -1, 44, -1, -1, -1, 43, -1, 88, -1, 71, -1, 182, -1, -1, -1, 20, -1, 22, -1, 839, -1, 50, -1, -1, -1, 230, -1, 206, -1, 367, -1, 472, -1, -1, -1
OFFSET
1,7
EXAMPLE
a(9)=2 because f(9,2)=12223242526272829 is prime number and f(9,0)=10203040506070809 and f(9,1)=11213141516171819 are not.
PROG
(Magma) a:=[]; for n in [1..86] do if (n eq 1) or (n mod 2 eq 0) or (n mod 5 eq 0) then a[n]:=-1; else k:=0; while true do s:=IntegerToString(1); for i in [2..n] do s*:=IntegerToString(k)*IntegerToString(i); end for; if IsPrime(StringToInteger(s)) then a[n]:=k; break; end if; k+:=1; end while; end if; end for; a; // Jon E. Schoenfield, Nov 03 2013
CROSSREFS
Sequence in context: A288196 A072883 A093101 * A206566 A376596 A088151
KEYWORD
sign,base
AUTHOR
Farideh Firoozbakht, Jun 13 2003
EXTENSIONS
Missing terms added by Jon E. Schoenfield, Nov 03 2013
STATUS
approved