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 11 results. Next

A018856 2^a(n) is the smallest power of 2 beginning with n.

Original entry on oeis.org

0, 1, 5, 2, 9, 6, 46, 3, 53, 10, 50, 7, 17, 47, 77, 4, 34, 54, 84, 11, 31, 51, 61, 81, 8, 18, 38, 48, 68, 78, 98, 5, 25, 35, 45, 55, 75, 85, 95, 12, 22, 32, 42, 145, 52, 62, 72, 82, 92, 102, 9, 19, 29, 39, 142, 49, 59, 162, 69, 79, 89, 192, 99, 6, 16, 119, 26
Offset: 1

Views

Author

Keywords

References

  • A. M. Yaglom and I. M. Yaglom, Challenging Mathematical Problems With Elementary Solutions, Vol. 1, pp. 29, 199-200, Prob. 91a, Dover, NY, 1987.

Crossrefs

Cf. A018802.
Cf. A100129 (a(n) = n).

Programs

  • Haskell
    import Data.List (isPrefixOf, findIndex)
    import Data.Maybe (fromJust)
    a018856 n =
       fromJust $ findIndex (show n `isPrefixOf`) $ map show a000079_list
    -- Reinhard Zumkeller, Aug 04 2011
    
  • Mathematica
    f[n_] := Block[{k = 1, m = Floor[ Log[10, n]]}, While[ Log[10, 2^k] < Floor[ Log[10, n]], k++ ]; While[ Quotient[2^k, 10^(Floor[k*Log[10, 2]] - m)] != n, k++ ]; k]; f[1] = 0;; Array[f, 73] (* Robert G. Wilson v, Jun 02 2009 *)
  • Python
    from itertools import count
    def aupton(terms):
        adict, pow2 = dict(), 1
        for i in count(0):
            s = str(pow2)
            for j in range(len(s)):
                t = int(s[:j+1])
                if t > terms:
                    break
                if t not in adict:
                    adict[t] = i
            if len(adict) == terms:
                return [adict[i+1] for i in range(terms)]
            pow2 *= 2
    print(aupton(67)) # Michael S. Branicky, Apr 08 2023

A320930 Numbers k such that 4^k starts with k.

Original entry on oeis.org

10, 17, 556, 1771, 4695, 38537, 56969, 345797, 141419115, 1788191728
Offset: 1

Views

Author

Robert Israel, Oct 24 2018

Keywords

Examples

			4^10 = 1048576 starts with 10, so 10 is in the sequence.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local t, b;
      t:= 4^n;
    b:= ilog10(t) - ilog10(n);
    floor(t/10^b) = n
    end proc:
    select(filter, [$1..10^5]);
  • Python
    def afind(limit, startk=1):
        k, pow4 = startk, 4**startk
        for k in range(startk, limit+1):
            if str(pow4).startswith(str(k)):
                print(k, end=", ")
            pow4 *= 4
    afind(10**4) # Michael S. Branicky, Oct 17 2021

Extensions

a(8)-a(10) from Giovanni Resta, Oct 25 2018

A362096 Numbers k such that 3^k starts with k.

Original entry on oeis.org

185, 225, 286, 182822, 8547303, 102886695, 472597369, 7627072026
Offset: 1

Views

Author

N. J. A. Sloane, Apr 10 2023, based on an email from Keith F. Lynch

Keywords

Crossrefs

For k such that b^k starts with n, for b = 2,..., 9, see A100129, A362096, A320930, A362097-A362101.

A362097 Numbers k such that 5^k starts with k.

Original entry on oeis.org

2, 7, 19, 67, 602, 1189, 3028, 48076, 5778508, 7409478, 269801494
Offset: 1

Views

Author

N. J. A. Sloane, Apr 10 2023, based on an email from Keith F. Lynch

Keywords

Crossrefs

For k such that b^k starts with n, for b = 2,..., 9, see A100129, A362096, A320930, A362097-A362101.

A362101 Numbers k such that 9^k starts with k.

Original entry on oeis.org

5, 69, 789, 2004, 1212215, 1766831, 437882194, 5217071661
Offset: 1

Views

Author

N. J. A. Sloane, Apr 10 2023, based on an email from Keith F. Lynch

Keywords

Crossrefs

For k such that b^k starts with n, for b = 2,..., 9, see A100129, A362096, A320930, A362097-A362101.

A131494 Values of n such that e^n starts with the digits n.

Original entry on oeis.org

5825, 561220, 7755606, 2888937688, 6264901444, 23619873712, 571269301377, 713764980661, 869172568999, 5532978040527, 7642834168124, 203889078936944, 40287674650484416, 243168646125929188, 940265659937347772
Offset: 1

Views

Author

Randy L. Ekl, Aug 12 2007

Keywords

Examples

			561220 is a term of this sequence because e^561220 = 561220.7799... * 10^243729, which starts with 561220.
		

Crossrefs

Programs

  • PARI
    e=exp(1);s=1;for(i=1,10000000,s=s*e; if(s-i>11,s=s/10,); if(floor(s)==i,printp1(i,", "),))

Extensions

a(4)-a(15) from Max Alekseyev, Sep 12 2013

A362098 Numbers k such that 6^k starts with k.

Original entry on oeis.org

13, 21, 197, 1991, 1022859, 1346570, 1351632, 15919007, 22440783, 415638567, 9345895862
Offset: 1

Views

Author

N. J. A. Sloane, Apr 10 2023, based on an email from Keith F. Lynch

Keywords

Crossrefs

For k such that b^k starts with n, for b = 2,..., 9, see A100129, A362096, A320930, A362097-A362101.

A362099 Numbers k such that 7^k starts with k.

Original entry on oeis.org

3, 5560, 14350, 76972, 239123, 2067170, 19320438, 748459491, 1273027965, 6925699528, 7758433284, 8408679517
Offset: 1

Views

Author

N. J. A. Sloane, Apr 10 2023, based on an email from Keith F. Lynch

Keywords

Crossrefs

For k such that b^k starts with n, for b = 2,..., 9, see A100129, A362096, A320930, A362097-A362101.

A362100 Numbers k such that 8^k starts with k.

Original entry on oeis.org

4, 10, 18, 652, 1299, 8225, 12949, 56230, 156277, 3227298, 144225157
Offset: 1

Views

Author

N. J. A. Sloane, Apr 10 2023, based on an email from Keith F. Lynch

Keywords

Crossrefs

For k such that b^k starts with n, for b = 2,..., 9, see A100129, A362096, A320930, A362097-A362101.

Programs

  • Maple
    filter:= proc(n) local d1, d2, t;
      t:= 8^n;
      d1:= ilog10(t);
      d2:= ilog10(n);
      floor(t/10^(d1-d2)) = n
    end proc:
    select(filter, [$1..10^5]); # Robert Israel, Apr 10 2023
  • Python
    from itertools import count, islice
    def A362100_gen(startvalue=1): # generator of terms >= startvalue
        a = 1<<3*(m:=max(startvalue,1))
        for n in count(m):
            if (s:=str(n))==str(a)[:len(s)]:
                yield n
            a <<= 3
    A362100_list = list(islice(A362100_gen(),5)) # Chai Wah Wu, Apr 10 2023

A362175 Least number k > 1 not a power of 10 such that k^n, n > 2, starts with k, or -1 if no such number exists.

Original entry on oeis.org

32, 46416, 18, 4, 6813, 2, 75, 6, 2, 152, 6813, 12, 44, 4, 65, 2, 6, 3, 2, 3, 39, 5, 75, 4, 538, 2, 72, 53, 2, 69, 7, 5, 7627, 4, 6, 2, 12, 13434, 2, 8, 3, 5, 13, 4, 33246, 2, 14, 11, 2, 18, 538, 5, 6, 152, 75, 2, 7, 21, 2, 3, 552, 3, 75, 3, 39, 2, 3057, 38, 2, 7, 6, 5
Offset: 3

Views

Author

Jean-Marc Rebert, Apr 11 2023

Keywords

Examples

			a(3) = 32, because 32^3 = 32768 begins with 32, and no lesser number k > 2 and not a power of 10 has this property.
		

Crossrefs

Programs

  • PARI
    a(n) = my(k=2); while(!((v = strsplit(Str(k^n), Str(k))) && (#v >= 2) && (v[1] == "")), k++; if (sumdigits(k)==1, k++)); k; \\ Michel Marcus, Apr 11 2023
    
  • Python
    from itertools import count
    def a(n): return next(k for k in count(2) if (s:=str(k)).strip("0")!="1" and str(k**n).startswith(s))
    print([a(n) for n in range(3, 75)]) # Michael S. Branicky, Apr 11 2023
Showing 1-10 of 11 results. Next