%I #22 Sep 08 2022 08:45:28
%S 4,9,2,4,1,1,2,3,5,8,9,1,1,1,2,2,3,3,4,5,5,6,6,7,9,1,1,1,1,1,1,1,1,1,
%T 2,2,2,2,2,2,3,3,3,3,3,3,4,4,5,5,5,5,5,6,6,6,7,7,7,7,8,8,9,9,9,1,1,1,
%U 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
%N Initial digit of squares of primes.
%F a(n) = A000030(A000290(A000040(n))). - _R. J. Mathar_, Jan 07 2007
%F a(n) = A000030(A001248(n)). - _Michel Marcus_, Aug 13 2015
%p A000030 := proc(n) local idig ; idig := n ; while idig > 9 do idig := iquo(idig,10) ; od ; RETURN(idig) ; end ; A000040 := proc(n) ithprime(n) ; end; A125575 := proc(n) A000030(A000040(n)^2) ; end; for n from 1 to 100 do printf("%d,",A125575(n)) ; end; # _R. J. Mathar_, Jan 07 2007
%t Table[First[IntegerDigits[Prime[n]^2]], {n, 1, 100}] (* _Vincenzo Librandi_, Aug 13 2015 *)
%o (PARI) first(m)=my(v=vector(m,i,digits(prime(i)^2)[1]));v; /* _Anders Hellström_, Aug 12 2015 */
%o (Magma) [Intseq(p^2)[#Intseq(p^2)]: p in PrimesUpTo(500)]; // _Vincenzo Librandi_, Aug 13 2015
%Y Cf. A000030, A000040, A000290, A001248.
%K easy,nonn,base
%O 1,1
%A Anonymous, Jan 03 2007
%E More terms from _R. J. Mathar_, Jan 07 2007