cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

Showing 1-10 of 10 results.

A124692 Position of substring A032740(n) within the decimal expansion of 2^A032740(n).

Original entry on oeis.org

1, 1, 3, 10, 2, 10, 5, 3, 11, 13, 2, 5, 20, 4, 3, 24, 19, 5, 17, 19, 35, 25, 53, 67, 60, 61, 33, 74, 18, 109, 17, 30, 117, 96, 66, 14, 57, 62, 97, 80, 25, 81, 38, 112, 143, 152, 2, 92, 122, 113, 129, 93, 20, 159, 138, 187, 26, 57, 35, 105, 158, 9, 50, 58, 198, 185, 182, 42, 17
Offset: 1

Views

Author

Cino Hilliard, Dec 25 2006, corrected Jun 26 2007

Keywords

Comments

A032740 includes numbers n that are a substring of 2^n.

Examples

			A032740(1) = 6 is a substring of 64 = 2^6 starting at position 1, so a(1) = 1.
A032740(2) = 10 is a substring of 1024 = 2^10 starting at position 1, so a(2) = 1.
A032740(3) = 36 is a substring of 68719476736 = 2^36 starting at position 10, so a(3) = 10.
		

Extensions

Edited by N. J. A. Sloane at the suggestion of Andrew S. Plewe, Jun 23 2007

A100129 Numbers k such that 2^k starts with k.

Original entry on oeis.org

6, 10, 1542, 77075, 113939, 1122772, 2455891300, 2830138178, 136387767490, 2111259099790, 3456955336468, 4653248164310, 10393297007134, 321249146279171, 972926121017616, 72780032758751764
Offset: 1

Views

Author

Mark Hudson (mrmarkhudson(AT)hotmail.com), Nov 15 2004

Keywords

Comments

According to van de Lune, Erdős observed that 2^6 = 64 and 2^10 = 1024 were two examples where the decimal expansion of 2^k starts with that of k. At that time no other examples were known. Jan van de Lune computed the first 6 terms in 1978. - Juan Arias-de-Reyna, Feb 12 2016

Examples

			2^6 = 64, which begins with 6;
2^10 = 1024, which begins with 10.
		

Crossrefs

Cf. A064541 (2^k ending with k), A032740 (k a substring of 2^k), A131494.

Programs

  • Mathematica
    f[n_] := Floor[ 10^Floor[ Log[10, n]](10^FractionalPart[n*N[ Log[10, 2], 24]])]; Do[ If[ f[n] == n, Print[n]], {n, 125000000}] (* Robert G. Wilson v, Nov 16 2004 *)
  • Python
    # Caveat: fails for large n due to rounding error.
    from math import log10 as log
    frac = lambda x: x - int(x)
    is_a100129 = lambda n: 0 <= frac(n * log(2)) - frac(log(n)) < log(n + 1) - log(n) # David Radcliffe, Jun 02 2019
    
  • Python
    from itertools import count, islice
    def A100129_gen(startvalue=1): # generator of terms
        a = 1<<(m:=max(startvalue,1))
        for n in count(m):
            if (s:=str(n))==str(a)[:len(s)]:
                yield n
            a <<= 1
    A100129_list = list(islice(A100129_gen(),4)) # Chai Wah Wu, Apr 10 2023

Formula

The sequence contains k if and only if 0 <= {k*log_10(2)} - {log_10(k)} < log_10(k+1) - log_10(k), where {x} denotes the fractional part of x. See the van de Lune article. - David Radcliffe, Jun 02 2019

Extensions

a(5) and a(6) from Robert G. Wilson v, Nov 16 2004
More terms from Robert Gerbicz, Aug 22 2006

A049301 Numbers k such that k is a substring of 3^k.

Original entry on oeis.org

7, 9, 24, 28, 57, 61, 62, 69, 71, 72, 77, 78, 80, 83, 87, 89, 95, 111, 162, 170, 174, 185, 191, 218, 222, 225, 229, 232, 249, 255, 259, 266, 267, 286, 288, 298, 314, 315, 322, 328, 329, 330, 332, 338, 351, 352, 362, 373, 376, 381, 386, 387, 414, 421, 435, 438
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    ssQ[n_]:=MemberQ[Partition[IntegerDigits[3^n],IntegerLength[n],1], IntegerDigits[ n]]; Select[Range[500],ssQ] (* Harvey P. Dale, Jul 16 2013 *)

A049302 Numbers k such that k is a substring of 4^k.

Original entry on oeis.org

6, 10, 17, 25, 36, 42, 50, 59, 60, 61, 72, 73, 78, 79, 81, 84, 86, 87, 89, 92, 93, 95, 96, 160, 200, 212, 222, 225, 227, 239, 260, 261, 269, 290, 291, 296, 300, 301, 304, 311, 313, 315, 324, 326, 327, 330, 336, 344, 345, 348, 350, 355, 362, 372, 378, 379, 381
Offset: 1

Views

Author

Keywords

Crossrefs

A049303 Numbers k such that k is a substring of 5^k.

Original entry on oeis.org

2, 5, 6, 7, 9, 19, 25, 32, 34, 36, 41, 54, 55, 56, 59, 62, 64, 67, 69, 70, 71, 75, 80, 81, 82, 84, 86, 87, 89, 92, 93, 95, 96, 111, 115, 125, 128, 140, 163, 166, 177, 178, 189, 192, 205, 212, 219, 221, 226, 233, 236, 242, 258, 259, 267, 294, 303, 309, 323, 327, 329
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    ss5nQ[n_]:=Module[{len=IntegerLength[n]},MemberQ[Partition[ IntegerDigits[ 5^n], len,1],IntegerDigits[n]]]; Select[Range[400],ss5nQ] (* Harvey P. Dale, Jan 06 2013 *)
    Select[Range[350],SequenceCount[IntegerDigits[5^#],IntegerDigits[#]]>0&] (* Harvey P. Dale, Dec 27 2024 *)

A049304 Numbers k such that k is a substring of 6^k.

Original entry on oeis.org

6, 7, 9, 13, 21, 22, 23, 29, 39, 40, 42, 44, 45, 48, 53, 55, 56, 60, 63, 64, 65, 67, 68, 69, 70, 73, 74, 75, 76, 77, 79, 82, 83, 87, 89, 92, 93, 94, 98, 105, 107, 127, 129, 131, 134, 137, 143, 147, 152, 163, 165, 167, 174, 179, 184, 189, 197, 224, 226, 227, 234, 240
Offset: 1

Views

Author

Keywords

Examples

			9 is in the sequence because 6^9 = 10077696 contains 9 as a substring. - _David A. Corneth_, Aug 13 2021
		

Crossrefs

Programs

  • Mathematica
    Select[Range[250],SequenceCount[IntegerDigits[6^#],IntegerDigits[#]]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Aug 03 2018 *)
  • PARI
    is(n) = { my(digs6n, digsn, streak, i, j); digs6n = digits(6^n); digsn = digits(n); for(i = 1, #digs6n + 1 - #digsn, streak = 0; for(j = 1, #digsn, if(digs6n[i + j - 1] == digsn[j], streak++ , next(2) ) ); if(streak == #digsn, return(1) ) ); 0 } \\ David A. Corneth, Aug 13 2021
  • Python
    def ok(n): return str(n) in str(6**n)
    print(list(filter(ok, range(241)))) # Michael S. Branicky, Aug 13 2021
    

A049306 Numbers k such that k is a substring of 8^k.

Original entry on oeis.org

4, 6, 7, 10, 13, 17, 18, 28, 31, 33, 36, 38, 42, 44, 47, 48, 49, 52, 54, 56, 58, 60, 63, 64, 67, 68, 69, 76, 77, 79, 81, 82, 83, 85, 86, 89, 90, 91, 94, 97, 112, 115, 124, 130, 135, 165, 173, 176, 178, 189, 193, 195, 206, 208, 215, 221, 225, 249, 251, 252, 253, 256
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[300],SequenceCount[IntegerDigits[8^#],IntegerDigits[#]]>0&] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Dec 16 2018 *)
  • Python
    def ok(n): return str(n) in str(8**n)
    print(list(filter(ok, range(257)))) # Michael S. Branicky, Aug 13 2021

A049305 Numbers k such that k is a substring of 7^k.

Original entry on oeis.org

3, 4, 6, 8, 12, 15, 20, 40, 42, 43, 50, 53, 55, 59, 60, 61, 62, 69, 72, 73, 74, 75, 78, 79, 80, 81, 83, 86, 87, 88, 89, 93, 94, 95, 96, 97, 99, 100, 103, 111, 113, 114, 118, 164, 165, 185, 193, 200, 207, 210, 215, 220, 230, 232, 238, 241, 243, 250, 253, 254, 255
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Python
    def ok(n): return str(n) in str(7**n)
    print(list(filter(ok, range(256)))) # Michael S. Branicky, Aug 13 2021

A049307 Numbers k such that k is a substring of 9^k.

Original entry on oeis.org

5, 7, 9, 25, 26, 31, 37, 43, 46, 47, 48, 53, 59, 60, 61, 63, 68, 69, 70, 72, 74, 76, 80, 85, 87, 88, 89, 91, 94, 97, 101, 104, 107, 124, 132, 135, 140, 148, 158, 166, 170, 180, 187, 190, 199, 209, 211, 215, 231, 243, 244, 256, 266, 270, 271, 279, 283, 288, 289, 291
Offset: 1

Views

Author

Keywords

Crossrefs

A178246 Numbers m such that all digits of m, including repetitions, occur among the digits of 2^m.

Original entry on oeis.org

6, 10, 14, 17, 21, 25, 27, 28, 29, 30, 31, 35, 36, 37, 39, 44, 45, 46, 47, 48, 49, 50, 51, 52, 54, 56, 57, 58, 60, 61, 62, 63, 64, 66, 67, 68, 69, 70, 72, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 93, 94, 95, 96, 97, 98, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 113, 114, 115, 116, 117
Offset: 1

Views

Author

Michel Lagneau, Dec 20 2010

Keywords

Comments

The sequence shows subsets of consecutive numbers.
153 is assumed to be the largest integer missing in this sequence. - Alois P. Heinz, Jan 28 2022

Examples

			17 is a term because the digits 1 and 7 are included in the number 2^17 = 131072;
3 is not a term because the digit 3 is not in the number 2^3 = 8.
33 is not a term because 2^33 = 8589934592 does not have 2 digits 3.
153 is not in the sequence because the digit 3 is not in the number 2^153 = 11417981541647679048466287755595961091061972992.
		

Crossrefs

Programs

  • Mathematica
    Reap[Do[a = DigitCount[2^n]; b = DigitCount[n]; If[Min[a-b] >= 0, Sow[n]], {n, 10^3}]][[2, 1]]
  • PARI
    isok(m) = {my(d=digits(m), dd=digits(2^m)); for (i=0, 9, if (#select(x->(x==i), d) > #select(x->(x==i), dd), return (0));); return(1);} \\ Michel Marcus, Jan 28 2022

Extensions

Name clarified by Michel Marcus, Jan 30 2022
Showing 1-10 of 10 results.