login
A125575
Initial digit of squares of primes.
1
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, 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, 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
OFFSET
1,1
FORMULA
a(n) = A000030(A000290(A000040(n))). - R. J. Mathar, Jan 07 2007
a(n) = A000030(A001248(n)). - Michel Marcus, Aug 13 2015
MAPLE
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
MATHEMATICA
Table[First[IntegerDigits[Prime[n]^2]], {n, 1, 100}] (* Vincenzo Librandi, Aug 13 2015 *)
PROG
(PARI) first(m)=my(v=vector(m, i, digits(prime(i)^2)[1])); v; /* Anders Hellström, Aug 12 2015 */
(Magma) [Intseq(p^2)[#Intseq(p^2)]: p in PrimesUpTo(500)]; // Vincenzo Librandi, Aug 13 2015
CROSSREFS
KEYWORD
easy,nonn,base
AUTHOR
Anonymous, Jan 03 2007
EXTENSIONS
More terms from R. J. Mathar, Jan 07 2007
STATUS
approved