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!)
A108824 Primes such that the outer 2 digits are n and n+1 and all inner digits are 7, where 0 < n < 9. 0

%I #7 Nov 21 2013 12:48:43

%S 677,8779,27773,67777,8777779,27777777773,67777777777,67777777777777,

%T 67777777777777777777777777,87777777777777777777777777777779,

%U 8777777777777777777777777777777777779

%N Primes such that the outer 2 digits are n and n+1 and all inner digits are 7, where 0 < n < 9.

%C Because prime numbers must end in odd digits other than 5, the only beginning/end digits combinations that satisfy the definition are (2,3), (6,7), and (8,9). [From Harvey P. Dale, Jan 29 2012]

%F a(x) = 10^(x+1)*n+floor(10^x*7/9)*10+n+1. Output if a(x) is prime.

%t Select[Flatten[Table[{FromDigits[Join[PadRight[{2},n,7],{3}]], FromDigits[ Join[PadRight[{6},n,7],{7}]],FromDigits[ Join[PadRight[ {8},n,7],{9}]]},{n,2,70}]],PrimeQ] (* _Harvey P. Dale_, Jan 29 2012 *)

%o (PARI) n10np1(n) = { local(x,y,k); for(x=1,n, for(k=1,8, y=10^(x+1)*k+floor(10^x*7/9)*10+k+1; if(isprime(y),print1(y",")) ) ) }

%K easy,nonn,base

%O 1,1

%A _Cino Hilliard_, Jul 11 2005

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 April 19 21:09 EDT 2024. Contains 371798 sequences. (Running on oeis4.)