The OEIS mourns the passing of Jim Simons and is grateful to the Simons Foundation for its support of research in many branches of science, including the OEIS.
login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A330243 Numbers k such that the first digit of the decimal expansion of 2^k is 7. 6
46, 56, 66, 76, 86, 96, 149, 159, 169, 179, 189, 242, 252, 262, 272, 282, 292, 345, 355, 365, 375, 385, 438, 448, 458, 468, 478, 488, 531, 541, 551, 561, 571, 581, 634, 644, 654, 664, 674, 727, 737, 747, 757, 767, 777, 830, 840, 850, 860, 870, 923, 933, 943, 953 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,1
COMMENTS
The asymptotic density of this sequence is log_10(8/7) = 0.057991... - Amiram Eldar, Jan 27 2021
LINKS
EXAMPLE
70368744177664 = 2^46.
MATHEMATICA
Select[Range[1000], Floor[2^# / 10^(Floor[# * Log10[2]])] == 7 &] (* Amiram Eldar, Dec 07 2019 *)
Select[Range[1000], IntegerDigits[2^#][[1]]==7&] (* or *) Select[Range[ 1000], NumberDigit[2^#, IntegerLength[2^#]-1]==7&] (* Harvey P. Dale, Aug 10 2021 *)
PROG
(C#)
public static void Main()
{
for(int a = 1; a <= 10000; a++)
{
BigInteger n1 = BigInteger.Pow(2, a);
string n2 = Convert.ToString(n1);
if(n2.StartsWith("7"))
{
Console.WriteLine(a);
}
}
}
(Python)
A330243_list = [n for n in range(10**3) if str(2**n)[0] == '7'] # Chai Wah Wu, Dec 12 2019
CROSSREFS
Sequence in context: A336098 A115444 A119385 * A326646 A332952 A308099
KEYWORD
nonn,easy,base
AUTHOR
Eder Vanzei, Dec 06 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified May 14 13:40 EDT 2024. Contains 372533 sequences. (Running on oeis4.)