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

A037124 Numbers that contain only one nonzero digit.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, 10000, 20000, 30000, 40000, 50000, 60000, 70000, 80000, 90000, 100000
Offset: 1

Views

Author

Vasiliy Danilov (danilovv(AT)usa.net), Jun 15 1998

Keywords

Comments

Starting with 1: next greater number not containing the highest digit (see also A098395). - Reinhard Zumkeller, Oct 31 2004
A061116 is a subsequence. - Reinhard Zumkeller, Mar 26 2008
Subsequence of A193460. - Reinhard Zumkeller, Jul 26 2011

Crossrefs

Programs

  • Haskell
    a037124 n = a037124_list !! (n-1)
    a037124_list = f [1..9] where f (x:xs) = x : f (xs ++ [10*x])
    -- Reinhard Zumkeller, May 03 2011
    
  • Magma
    [((n mod 9)+1) * 10^Floor(n/9): n in [0..50]]; // Vincenzo Librandi, Nov 11 2014
    
  • Mathematica
    Table[(10^Floor[(n - 1)/9])*(n - 9*Floor[(n - 1)/9]), {n, 1, 50}] (* José de Jesús Camacho Medina, Nov 10 2014 *)
    Array[(Mod[#, 9] + 1) * 10^Floor[#/9] &, 50, 0] (* Paolo Xausa, Oct 10 2024 *)
  • PARI
    is(n)=n>0 && n/10^valuation(n,10)<10 \\ Charles R Greathouse IV, Jan 29 2017
    
  • Python
    def A037124(n):
        a, b = divmod(n-1,9)
        return 10**a*(b+1) # Chai Wah Wu, Oct 16 2024

Formula

a(n) = (((n - 1) mod 9) + 1) * 10^floor((n - 1)/9). E.g., a(40) = ((39 mod 9) + 1) * 10^floor(39/9) = (3 + 1) * 10^4 = 40000. - Carl R. White, Jan 08 2004
a(n) = A051885(n-1) + 1. - Reinhard Zumkeller, Jan 03 2008, Jul 10 2011
A138707(a(n)) = A000005(a(n)). - Reinhard Zumkeller, Mar 26 2008
From Reinhard Zumkeller, May 26 2008: (Start)
a(n+1) = a(n) + a(n - n mod 9).
a(n) = A140740(n+9, 9). (End)
A055640(a(n)) = 1. - Reinhard Zumkeller, May 03 2011
A193459(a(n)) = A000005(a(n)). - Reinhard Zumkeller, Jul 26 2011
Sum_{n>0} 1/a(n)^s = (10^s)*(zeta(s) - zeta(s,10))/(10^s-1), with (s>1). - Enrique Pérez Herrero, Feb 05 2013
a(n) = (10^floor((n - 1)/9))*(n - 9*floor((n - 1)/9)). - José de Jesús Camacho Medina, Nov 10 2014
From Chai Wah Wu, May 28 2016: (Start)
a(n) = 10*a(n-9).
G.f.: x*(9*x^8 + 8*x^7 + 7*x^6 + 6*x^5 + 5*x^4 + 4*x^3 + 3*x^2 + 2*x + 1)/(1 - 10*x^9). (End)
a(n) ≍ 1.2589...^n, where the constant is A011279. (f ≍ g when f << g and g << f, that is, there are absolute constants c,C > 0 such that for all large n, |f(n)| <= c|g(n)| and |g(n)| <= C|f(n)|.) - Charles R Greathouse IV, Mar 11 2021
Sum_{n>=1} 1/a(n) = 7129/2268. - Amiram Eldar, Jan 21 2022

A130084 Smallest number whose tenth power has at least n digits.

Original entry on oeis.org

1, 2, 2, 2, 3, 4, 4, 6, 7, 8, 10, 13, 16, 20, 26, 32, 40, 51, 64, 80, 100, 126, 159, 200, 252, 317, 399, 502, 631, 795, 1000, 1259, 1585, 1996, 2512, 3163, 3982, 5012, 6310, 7944, 10000, 12590, 15849, 19953, 25119, 31623, 39811, 50119, 63096, 79433, 100000
Offset: 1

Views

Author

Klaus Brockhaus, May 07 2007

Keywords

Comments

Powers of tenth root of 10 rounded up.

Examples

			3^10 = 59049 has five digits, 4^10 = 1048576 has seven digits, hence a(6) = a(7) = 4.
		

Crossrefs

Cf. A011279, A011557 (powers of 10), A017936 (smallest number whose square has n digits), A018005 (smallest number whose cube has n digits), A018074 (smallest number whose fourth power has n digits), A018143 (smallest number whose fifth power has n digits), A130080 to A130083 (smallest number whose sixth ... ninth power has n digits).

Programs

  • Magma
    [Ceiling(Root(10^(n-1),10)): n in [1..51]];
    
  • Mathematica
    Table[(Ceiling[10^((n - 1)/10)]), {n, 1, 60}] (* Vincenzo Librandi, Sep 20 2013 *)
  • Python
    from sympy import integer_nthroot
    def A130084(n): return (lambda x:x[0]+(not x[1]))(integer_nthroot(10**(n-1),10)) # Chai Wah Wu, Jun 20 2024

Formula

a(n) = ceiling(10^((n-1)/10)).

A011289 Decimal expansion of 20th root of 10.

Original entry on oeis.org

1, 1, 2, 2, 0, 1, 8, 4, 5, 4, 3, 0, 1, 9, 6, 3, 4, 3, 5, 5, 9, 1, 0, 3, 8, 9, 4, 6, 4, 7, 7, 9, 0, 5, 7, 3, 6, 7, 2, 2, 3, 0, 8, 5, 0, 7, 3, 6, 0, 5, 5, 2, 9, 6, 2, 4, 4, 5, 0, 7, 4, 4, 4, 8, 1, 7, 0, 1, 0, 3, 3, 0, 2, 6, 8, 6, 2, 2, 4, 3, 5, 5, 9, 4, 2, 3, 2, 2, 4, 1, 0, 6, 9, 3, 1, 9, 0, 4, 7
Offset: 1

Views

Author

Keywords

Comments

In many engineering branches, ratio of two "field" amplitudes corresponding to 1 dB power ratio. For a more detailed description, see A011279. - Stanislav Sykora, Apr 02 2012

Crossrefs

Cf. A011279.

Programs

A337840 a(n) is the decimal place of the start of the first occurrence of n in the decimal expansion of n^(1/n).

Original entry on oeis.org

0, 4, 10, 1, 38, 6, 9, 4, 12, 17, 26, 0, 264, 144, 107, 101, 101, 4, 78, 68, 36, 86, 11, 17, 147, 151, 205, 50, 55, 26, 307, 88, 94, 180, 177, 61, 113, 244, 280, 37, 110, 38, 285, 101, 124, 223, 243, 25, 86, 116, 66, 77, 146, 283, 3, 60, 20, 82, 27, 146, 82, 140
Offset: 1

Views

Author

William Phoenix Marcum, Sep 25 2020

Keywords

Comments

Does a(n) exist for all n? Some relatively large values: a(1021) = 67714, a(1111) = 64946. - Chai Wah Wu, Oct 07 2020

Examples

			For n = 1, 1^(1/1) = 1.0000000, so a(1) is 0.
For n = 12, 12^(1/12) ~= 1.2300755, so a(12) = 0.
		

Crossrefs

Cf. A177715.
Decimal expansions of some n^(1/n): A002193, A002581, A005534, A011215, A011231, A011247, A011263, A011279, A011295, A011311, A011327, A011343, A011359.

Programs

  • Mathematica
    max = 3000; a[n_] := SequencePosition[RealDigits[n^(1/n), 10, max][[1]], IntegerDigits[n]][[1, 1]] - 1; Array[a, 100] (* Amiram Eldar, Sep 25 2020 *)
  • PARI
    a(n) = {if (n==1, 0, my(p=10000); default(realprecision, p+1); my(x = floor(10^p*n^(1/n)), d = digits(x), nb = #Str(n)); for(k=1, #d-nb+1, my(v=vector(nb, i, d[k+i-1])); if (fromdigits(v) == n, return(k-1));); error("not found"););} \\ Michel Marcus, Sep 30 2020
    
  • Python
    import gmpy2
    from gmpy2 import mpfr, digits, root
    gmpy2.get_context().precision=10**5
    def A337840(n): # increase precision if -1 is returned
        return digits(root(mpfr(n),n))[0].find(str(n)) # Chai Wah Wu, Oct 07 2020

Extensions

More terms from Amiram Eldar, Sep 25 2020
Showing 1-4 of 4 results.