A137589 a(n) is the integer that results after deletion of all digits of n-th prime, except the initial digit and the final digit.
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 11, 13, 17, 19, 13, 17, 11, 17, 19, 19, 11, 17, 13, 17, 13, 19, 11, 11, 13, 17, 19, 21, 23, 27, 29, 23, 29, 21, 21, 27, 23, 29, 21, 27, 21, 23, 23, 37, 31, 33, 37, 31, 37, 37, 39, 33
Offset: 1
Examples
a(100) = 51 as prime(100) = 541. Concatenating the first and last digit gives 51. - _David A. Corneth_, Mar 23 2018
Links
- David A. Corneth, Table of n, a(n) for n = 1..10000
Programs
-
Mathematica
fdld[n_]:=Module[{idn=IntegerDigits[n]},FromDigits[{First[idn], Last[ idn]}]]; Join[Prime[Range[25]],fdld/@Prime[Range[26,100]]] (* Harvey P. Dale, Oct 10 2012 *)
-
PARI
a(n) = my(p = prime(n), d); if(n<=4, return(p)); d = digits(p); 10*d[1] + d[#d] \\ David A. Corneth, Mar 23 2018
Formula
a(n) = A138840(n) if n >= 5. - Omar E. Pol, Mar 23 2018
Extensions
New name from Omar E. Pol, Mar 24 2018
Comments