A077648 Initial digits of prime numbers.
2, 3, 5, 7, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 8, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
Offset: 1
Links
- Vincenzo Librandi, Table of n, a(n) for n = 1..10000
Programs
-
Magma
[Intseq(p)[#Intseq(p)]: p in PrimesUpTo(600)]; // Bruno Berselli, Feb 14 2013
-
Mathematica
Table[First[IntegerDigits[Prime[n]]], {n, 1, 120}]
-
PARI
a(n) = digits(prime(n))[1]; \\ Michel Marcus, Feb 11 2017
-
Python
from sympy import prime def A077648(n): return int(str(prime(n))[0]) # Chai Wah Wu, Oct 16 2024