login
Initial digits of squares.
(Formerly M3348)
13

%I M3348 #37 Aug 06 2021 05:33:10

%S 0,1,4,9,1,2,3,4,6,8,1,1,1,1,1,2,2,2,3,3,4,4,4,5,5,6,6,7,7,8,9,9,1,1,

%T 1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,3,4,4,4,4,

%U 4,4,4,5,5,5,5,5,5,5,6,6,6,6,6,6,7,7,7,7,7,7,8,8,8,8,8,9,9,9,9,9,1

%N Initial digits of squares.

%C a(n) = A000030(A000290(n)). - _Reinhard Zumkeller_, Aug 17 2008

%D N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

%H T. D. Noe, <a href="/A002993/b002993.txt">Table of n, a(n) for n = 0..1000</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GelfandsQuestion.html">Gelfand's Question</a>

%p a:= n-> parse(""||(n^2)[1]):

%p seq(a(n), n=0..100); # _Alois P. Heinz_, Aug 06 2021

%t a[n_] := First[IntegerDigits[n^2]]; Table[a[n], {n, 0, 100} (* _Vladimir Joseph Stephan Orlovsky_, Dec 21 2008 *)

%t First[IntegerDigits[#]]&/@(Range[70]^2) (* _Harvey P. Dale_, Feb 09 2011 *)

%o (Haskell)

%o a002993 = a000030 . a000290 -- _Reinhard Zumkeller_, Apr 01 2015

%Y Cf. A000030, A000290, A089951, A002994.

%K nonn,base

%O 0,3

%A _N. J. A. Sloane_