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-3 of 3 results.

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

A131497 Values of k such that k^e starts with the digits of k.

Original entry on oeis.org

1, 4, 15, 56, 213, 813, 3104, 9632089, 36787239, 140499215, 2049402728, 7827156489, 29893772401, 6360445726168, 24292055125871, 354337952833519, 5168578128432327, 19740029272114749, 4200051540382303047, 16040995858310522148, 233983234616956426935, 893637628328498285466, 3413014663516027432461
Offset: 1

Views

Author

Randy L. Ekl, Aug 12 2007

Keywords

Comments

Subsequence of ceiling(10^(k/(e-1))). - Max Alekseyev, Sep 08 2013

Examples

			213 is a term of this sequence because 213^e = 2133987.96483717..., which starts with 213.
		

Crossrefs

Programs

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

Extensions

3 more terms from Ryan Propper, Dec 30 2007
a(11)-a(14) from Donovan Johnson, Oct 29 2010
Terms a(15) onward from Max Alekseyev, Sep 08 2013

A131493 Values of n such that Pi^n starts with the digits n.

Original entry on oeis.org

3, 226, 1837, 2163, 5358, 44857, 170788, 482721, 8918391, 36589396, 122394502, 1107852077, 10071260304, 22991513047, 81477190549, 422242473309, 4242315932866, 153777057499935, 282960008506695, 1683262946768556, 1099372130016731506, 1117679864051418714
Offset: 1

Views

Author

Randy L. Ekl, Aug 12 2007

Keywords

Examples

			226 is a term of this sequence because Pi^226 = 226.9191... * 10^110, which starts with 226.
		

Crossrefs

Programs

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

Extensions

a(10)-a(12) from Jon E. Schoenfield, Jul 17 2010
a(13)-a(22) from Max Alekseyev, Sep 12 2013
Showing 1-3 of 3 results.