OFFSET
1,24
LINKS
Harry J. Smith, Table of n, a(n) for n = 1..1000
EXAMPLE
MATHEMATICA
Accumulate[If[First[IntegerDigits[#]] == 8, 1, 0]&/@Prime[Range[100]]] (* Vincenzo Librandi, Nov 28 2016 *)
PROG
(PARI) digitsIn(x)= { local(d); if (x==0, return(1)); d=1 + log(x)\log(10); if (10^d == x, d++, if (10^(d-1) > x, d--)); return(d) } MSD(x)= { return(x\10^(digitsIn(x)-1)) } { a=0; p=2; for (n=1, 1000, q=prime(n); while (p <= q, if(MSD(p) == 8, a++); p=nextprime(p+1)); write("b065687.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 26 2009
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Reinhard Zumkeller, Nov 13 2001
STATUS
approved