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

A175424 a(n) is the number of steps of iterations of {(((D_k^D_(k-1))^D_(k-2))^...)^D_1, where D_k is the k-th digit D of number r and k is the number of digits of number r in decimal expansion of r (A055642)} needed to reach a single-digit number starting at r = n, or a(n) = -1 if a single-digit number is never reached.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, -1, -1, 3, 3, 2, 1, 1, 1, 4, 3, -1, -1, 3, 3, 3, 1, 1, 2, 2, 3, 3, 3, 2, 2, 2, 1, 1, 2, 3, 2, 4, 3, 2, 3, 2, 1, 1, 3, 3, 2, 3, 3, 3, 3, 2, 1, 1, 4, 3, 3, 3, 3, 3, 2, 3, 1, 1, 3, 2, 3, 2, 3, 2, 2, 2, 1, 1, 3, 3, 3, 3, 2, 2, 2, 2
Offset: 0

Views

Author

Jaroslav Krizek, May 09 2010

Keywords

Comments

Conjecture: max(a(n)) = 4.

Examples

			For n = 33: a(33) = 4 because for the number 33 there are 4 steps of defined iteration: {3^3 = 27}, {7^2 = 49}, {9^4 = 6561}, {((1^6)^5)^6 = 1}.
		

Crossrefs

Programs

  • PARI
    f(n) = if (n, my(d=digits(n), r=d[#d]); if (!vecmin(d), return(0)); forstep (k=#d-1, 1, -1, r = r^d[k];); r); \\ A175420
    findpos(n, list) = {forstep (k=#list, 1, -1, if (list[k] == n, return (k));); return (0);}
    a(n) = {my(list = List(n), nb = 0); while (n >= 10, n = f(n); my(k=findpos(n, list)); nb++; if (k, if (k==#list-1, if (list[k]<10, return (nb), return(-1)), return(-1));); listput(list, n);); return (nb);} \\ Michel Marcus, Jan 20 2022

A175398 Sequence of resulting numbers after iterations of {((((D_1^D_2)^D_3)^D_4)^... )^D_k, where D_k is the k-th digit D of the number r and k is the digit number of the number r in the decimal expansion of r (A055642)} needed to reach a one-digit number starting at r = n.

Original entry on oeis.org

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

Views

Author

Jaroslav Krizek, May 01 2010

Keywords

Comments

a(n) = 1 - 9 for infinitely many n.
E.g., a(n) = b (b = 1, 2, ..., 9) for numbers n = b*10^k + A002275(k), where k >= 1.
a(n) = 1 for numbers n such that A055642(A133500(n)) = 1 for n >= 1, e.g., if the number n starts with a digit 1 or contains a digit 0 or for n >= 1.
Sequences after k steps of defined iteration (k >= 0):
0th step: A001477: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, ...
1st step: A133500: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1, 3, 9, 27, 81, 243, 729, 2187, 6561, 19683, 1, 4, 16, 64, 256, 1024, 4096, 16384, 65536, 262144, 1, ...
2nd step: A175399: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 1, 9, 1296, 1, 1073741824, 25, 1, 3, 9, 128, 8, 4096, 1628413597910449, 72057594037927936, 221073919720733357899776, 1, 1, 4, 1, 1296, 1073741824, 1, 1, 1, ...
3rd step: A175400: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 1, 9, 1, 1, 1, 32, 1, 3, 9, 1, 8, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
4th step: A175401: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 1, 9, 1, 1, 1, 9, 1, 3, 9, 1, 8, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
See A175402 and A175403.

Examples

			For n = 29: a(29) = 9 because for the number 29 there are 4 steps of defined iteration: {2^9 = 512}, {(5^1)^2 = 25}, {2^5 = 32}, {3^2 = 9}. Resulting number is 9.
		

A175403 a(n) is the smallest number m requiring n iterations {((((D_1^D_2)^D_3)^D_4)^...)^D_k to reach a one-digit number starting at r = n, where D_k is the k-th digit D of the number r and k is the digit number of the number r in the decimal expansion of r (A055642)}.

Original entry on oeis.org

0, 10, 24, 26, 29
Offset: 0

Views

Author

Jaroslav Krizek, May 01 2010

Keywords

Comments

Conjecture: sequence is finite.
Assuming that A020665(2) = 86, A020665(3) = 68, A020665(5) = 58 and A020665(7) = 35, a(4) is the last term; see A175402.

Examples

			For n = 4: a(4) = 29 because 29 is the smallest number with 4 steps of defined iteration: {2^9 = 512}, {(5^1)^2 = 25}, {2^5 = 32}, {3^2 = 9}.
		

Crossrefs

Extensions

Comment and edits from Charles R Greathouse IV, Aug 03 2010
Further edits from N. J. A. Sloane, Aug 08 2010. I am still worried that n is mentioned too many times in the definition.

A259838 Decimal expansion of Sum_{n>=0} 2^n/100^A055642(2^n).

Original entry on oeis.org

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

Views

Author

R. J. Mathar, Jul 06 2015

Keywords

Examples

			0.16226215644820295983086680761089...
		

Crossrefs

Programs

Formula

Equals Sum_{n>=0} p/100^A055642(p) where p = A000079(n).

A175405 Numbers m such that the resulting number h after iterations of {((((D_1^D_2)^D_3)^D_4)^...)^D_k, where D_k is the k-th digit D of the number r and k is the digit number of the number r in the decimal expansion of r (A055642)} needed to reach a one-digit number starting at r = n is equal to 1 (h = 1).

Original entry on oeis.org

1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 24, 26, 27, 28, 30, 33, 35, 36, 37, 38, 39, 40, 42, 43, 44, 45, 46, 47, 48, 49, 50
Offset: 1

Views

Author

Jaroslav Krizek, May 01 2010

Keywords

Examples

			For number a(14) = 26 we have iteration: {2^6 = 64}, {6^4 = 1296}, {((1^2)^9)^6 = 1}.
		

Crossrefs

A242945 Numbers n such that n + DigitProd(n) = 10^(A055642(n)).

Original entry on oeis.org

5, 91, 919, 7795, 7984, 9968647168, 9991319797, 9999761914432, 9999982446427242496
Offset: 1

Views

Author

Derek Orr, May 27 2014

Keywords

Comments

It is not known if this sequence is finite or infinite.
a(10) (if it exists) is > 10^300. - Max Alekseyev, Jan 15 2015

Examples

			919 + 9*1*9 = 1000 = 10^3. Thus 919 is a member of this sequence.
		

Crossrefs

Cf. A007954.

Programs

  • PARI
    DP(n)=p=1;for(i=1,#digits(n),p*=digits(n)[i]);return(p)
    for(n=1,10^6, if((n+DP(n))==10^(#Str(n)),print(n)))

Extensions

a(6)-a(9) from Hiroaki Yamanouchi, Jul 10 2014

A280827 a(n) = A076649(n) - A055642(n).

Original entry on oeis.org

-1, 0, 0, 1, 0, 1, 0, 2, 1, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 1, 0, 1, 0, 2, 0, 1, 1, 1, 0, 1, 0, 3, 1, 1, 0, 2, 0, 1, 1, 2, 0, 1, 0, 2, 1, 1, 0, 3, 0, 1, 1, 2, 0, 2, 1, 2, 1, 1, 0, 2, 0, 1, 1, 4, 1, 2, 0, 2, 1, 1, 0, 3, 0, 1, 1, 2, 1, 2, 0, 3, 2, 1, 0, 2, 1, 1, 1, 3, 0, 2, 1, 2, 1, 1, 1, 4, 0, 1, 2, 1
Offset: 1

Views

Author

Ely Golden, Jan 08 2017

Keywords

Comments

a(1) is the only negative term in this sequence. - Ely Golden, Jan 10 2017
a(n) = 0 if and only if n is a member of A109608. - Ely Golden, Jan 10 2017

Examples

			a(10) = 0, as 2*5 have 2 digits total, and 10 has 2 digits. Thus a(10) = 2-2 = 0.
a(1) is defined to be -1, as the empty product has 0 digits, and 1 has 1 digit. Thus a(1) = 0-1 = -1.
		

Crossrefs

Programs

  • SageMath
    def digits(x, n):
        if(x<=0|n<2):
            return []
        li=[]
        while(x>0):
            d=divmod(x, n)
            li.insert(0,d[1])
            x=d[0]
        return li;
    def factorDigits(x, n):
        if(x<=0|n<2):
            return []
        li=[]
        f=list(factor(x))
        for c in range(len(f)):
            for d in range(f[c][1]):
                ld=digits(f[c][0], n)
                li+=ld
        return li;
    def digitDiff(x,n):
        return len(factorDigits(x,n))-len(digits(x,n))
    radix=10
    index=1
    while(index<=10000):
        print(str(index)+" "+str(digitDiff(index,radix)))
        index+=1

A373206 Numbers m such that m^m == m (mod 10^(len(m) + 2)), where len(m) is the number of digits of m (A055642).

Original entry on oeis.org

1, 751, 1001, 2001, 2751, 3001, 4001, 5001, 5376, 6001, 6751, 7001, 8001, 9001, 10001, 18751, 20001, 30001, 40001, 50001, 58751, 60001, 69376, 70001, 80001, 90001, 98751, 100001, 110001, 120001, 130001, 138751, 140001, 150001, 160001, 170001, 180001, 190001
Offset: 1

Views

Author

Marco RipĂ , May 28 2024

Keywords

Comments

By definition, this sequence is a subsequence of A082576 and also a subsequence of A373205.
For each integer r >= 3 the sequence contains 10^r + 1.
All terms > 9001 end in 0001 (e.g., 10001), 0625 (e.g., 390625), 1249 (e.g., 781249), 8751 (e.g., 18751), 9376 (e.g., 69376), and possibly in 4193, 7057, or 9375.

Examples

			751 is a term since 751 is a 3-digit number and 751^751 == 500751 (mod 10^6) and thus 751^751 == 751 (mod 10^(3 + 2)).
		

Crossrefs

Programs

  • Mathematica
    Select[Range[200000],PowerMod[#,#,10^(IntegerLength[#]+2)]==#&] (* Harvey P. Dale, Dec 05 2024 *)
  • PARI
    for (len_m = 1, 5, for (m = 10^(len_m - 1), 10^len_m - 1, if (m == Mod(m, 10^(len_m + 1))^m, print1(m, ", "))));
    
  • Python
    from itertools import count
    def A373206_gen(): # generator of terms
        yield from (1, 751, 1001, 2001, 2751, 3001, 4001, 5001, 5376, 6001, 6751, 7001, 8001, 9001)
        for i in count(10000,10000):
            for j in (1,625,1249,4193,7057,8751,9375,9376):
                m = i+j
                if pow(m,m,100*10**(len(str(m)))) == m:
                    yield m
    A373206_list = list(islice(A373206_gen(),20)) # Chai Wah Wu, Jun 02 2024

Formula

For all terms m, m^m == m (mod 10^(floor(log_10(m)) + 3)).

A379373 Numbers k such that A050252(k) <= A055642(k).

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 11, 13, 14, 15, 16, 17, 19, 21, 23, 25, 27, 29, 31, 32, 35, 37, 41, 43, 47, 49, 53, 59, 61, 64, 67, 71, 73, 79, 81, 83, 89, 97, 101, 103, 105, 106, 107, 109, 111, 112, 113, 115, 118, 119, 121, 122, 123, 125, 127, 128, 129, 131, 133, 134, 135
Offset: 1

Views

Author

Paolo Xausa, Dec 21 2024

Keywords

Comments

Some authors call these numbers "economical numbers" (see links) and refer to A046759 as "frugal numbers", while other authors define "economical numbers" to be A046759.
First differs from A046758 at n = 54, where a(54) = 125 is missing from A046758.

Examples

			112 is a term because 112 = (2^4)*7; the total number of digits of (2, 4, 7) = 1 + 1 + 1 <= the number of digits of 112 (3).
125 is a term because 125 = 5^3; the total number of digits of (5, 3) = 1 + 1 <= the number of digits of 125 (3).
		

Crossrefs

Union of A046758 and A046759.
Complement of A046760.

Programs

  • Mathematica
    A379373Q[k_] := Total[IntegerLength[Select[Flatten[FactorInteger[k]], # > 1 &]]] <= IntegerLength[k];
    Select[Range[200], A379373Q]
  • Python
    from sympy import factorint
    def ok(n): return n > 0 and sum(len(str(p))+(len(str(e)) if e>1 else 0) for p, e in factorint(n).items()) <= len(str(n))
    print([k for k in range(136) if ok(k)]) # Michael S. Branicky, Dec 22 2024

A224926 Numerator of lexicographically least fraction f satisfying floor(f * 10^A055642(n)) = n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 4, 9, 1, 1, 1, 2, 1, 2, 1, 3, 2, 4, 1, 3, 2, 3, 6, 1, 4, 3, 2, 5, 3, 5, 8, 1, 8, 5, 4, 3, 5, 9, 2, 5, 3, 7, 4, 5, 6, 8, 12, 25, 1, 14, 9, 7, 6, 5, 9, 4, 7, 13, 3, 8, 5, 7, 9, 13, 2, 19, 11, 9, 7, 5, 8, 11, 20, 3, 10, 7, 11, 19, 4, 9, 14, 5
Offset: 1

Views

Author

Paul Tek, Apr 20 2013

Keywords

Comments

1 <= a(n) <= n.
For any reduced fraction u/v in the interval [1/10..1[, a(floor(u/v*10^k))=u for k sufficiently large.

Examples

			The fractions f satisfying floor(f*100)=42, are, in lexicographical order: 3/7, 6/14, 8/19, 9/21, 11/26, 12/28, 14/33, 15/35, 16/38, 17/40, 18/42, 19/45, 20/47, 21/49...
Hence, a(42)=numerator(3/7)=3.
		

Crossrefs

Cf. A224927 (denominators), A055642, A002487.

Programs

  • PARI
    a224926(n) =\
    local(a=0,b=1,c,d,e=1,f=0,x=1);\
    while(x<=n, x=x*10);\
    while(1, c=a+e;d=b+f;\
    if(c/d < n/x, a=c;b=d,\
    if(c/d >= (n+1)/x, e=c;f=d,\
    return(c))))
Showing 1-10 of 508 results. Next