OFFSET
1,1
COMMENTS
The plot of this sequence shows number of primes on the x-axis and the split of primes into 9 groups according to their first digit on the y-axis. The plot of a(n+1)/a(n) oscillates around 1 with decreasing amplitude. Log-periodic growth is seen on the plot of partial sums b(n)= Sum_(i=1..n) a(i).
LINKS
David A. Corneth, Table of n, a(n) for n = 1..10000
FORMULA
a(n) = A138840(n) if n >= 5. - Omar E. Pol, Mar 23 2018
EXAMPLE
a(100) = 51 as prime(100) = 541. Concatenating the first and last digit gives 51. - David A. Corneth, Mar 23 2018
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 *)
PROG
(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
CROSSREFS
KEYWORD
AUTHOR
Ctibor O. Zizka, Apr 26 2008
EXTENSIONS
New name from Omar E. Pol, Mar 24 2018
STATUS
approved