A077649 Initial digit of composite numbers.
4, 6, 8, 9, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1
Programs
-
Mathematica
c[x_] := FixedPoint[x+PrimePi[ # ]+1&, x] Table[First[IntegerDigits[c[w]]], {w, 1, 128}] First[IntegerDigits[#]]&/@Complement[Range[150],Prime[Range[ PrimePi[150]]]] (* Harvey P. Dale, Apr 26 2011 *)
-
PARI
lista(nn) = forcomposite(n=1, nn, print1(digits(n)[1], ", ")); \\ Michel Marcus, Dec 13 2017