login
Initial digit of cubes.
(Formerly M4468)
12

%I M4468 #36 Aug 06 2021 05:34:58

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

%T 3,4,4,5,5,5,6,6,7,7,8,9,9,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,3,

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

%N Initial digit of cubes.

%C a(n) = A000030(A000578(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="/A002994/b002994.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^3)[1]):

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

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

%o (Haskell)

%o a002994 = a000030 . a000578 -- _Reinhard Zumkeller_, Apr 01 2015

%o (PARI) a(n) = if (n, digits(n^3)[1], 0); \\ _Michel Marcus_, Dec 13 2017

%Y Cf. A000030, A000578, A144582, A002993.

%K nonn,easy,base

%O 0,3

%A _N. J. A. Sloane_