Gelfand's Question

Author

Eric W. Weisstein
January 27, 2009

This notebook downloaded from http://mathworld.wolfram.com/notebooks/IntegerSequences/GelfandsQuestion.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/GelfandsQuestion.html.

©2009 Wolfram Research, Inc. except for portions noted otherwise

Ennumeration

Map[IntegerDigits[#,10][[1]]&,
Table[k^n,{n,10},{k,2,9}],
{2}]//TableForm

Map[IntegerDigits[#,10][[1]]&,
Table[k^n,{n,10},{k,2,9}],
{2}]

Patterns

9 in the 2s column

Take[First[IntegerDigits[#]]&/@(2^Range[200]),200]

Position[%,9]//Flatten

23456789

Position[Table[First/@IntegerDigits/@(Range[2,9]^n),{n,5 10^4}],Range[2,9]]//Flatten//Timing

Position[Table[First/@IntegerDigits/@(Range[2,9]^n),{n,10^5}],Range[2,9]]//Flatten//Timing

d.{9}

Position[Equal@@@Table[First/@IntegerDigits/@(Range[2,9]^n),{n,10^5}],True]//Flatten//Timing

Position[Equal@@@Table[First/@IntegerDigits/@(Range[2,9]^n),{n,10^5}],True]//Flatten//Timing

(Subscript[d, 2])(Subscript[d, 3])(Subscript[d, 4])(Subscript[d, 5])(Subscript[d, 6])(Subscript[d, 7])(Subscript[d, 8])(Subscript[d, 9])is Prime

f=FromDigits[Table[First/@IntegerDigits/@(n^Range[11]),{n,2,9}]]

(p=Position[f=FromDigits[Table[First/@IntegerDigits/@(n^Range[1000]),{n,2,9}]],_?PrimeQ]//Flatten)//Timing

f[[p]]

Graphics

Ed Pegg, Jan. 2009

Manipulate[With[{gg=Table[First[First[RealDigits[(pow 1.)^n]]],{n,1,10000}]},ListPlot[FourierDCT[FourierDCT[gg-RotateRight[gg,rot]]]]],{rot,1,100,1},{pow,2,9,1}]