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

A011371 a(n) = n minus (number of 1's in binary expansion of n). Also highest power of 2 dividing n!.

Original entry on oeis.org

0, 0, 1, 1, 3, 3, 4, 4, 7, 7, 8, 8, 10, 10, 11, 11, 15, 15, 16, 16, 18, 18, 19, 19, 22, 22, 23, 23, 25, 25, 26, 26, 31, 31, 32, 32, 34, 34, 35, 35, 38, 38, 39, 39, 41, 41, 42, 42, 46, 46, 47, 47, 49, 49, 50, 50, 53, 53, 54, 54, 56, 56, 57, 57, 63, 63, 64, 64, 66, 66, 67, 67, 70
Offset: 0

Views

Author

Keywords

Comments

Terms of A005187 repeated. - Lekraj Beedassy, Jul 06 2004
This sequence shows why in binary 0 and 1 are the only two numbers n such that n equals the sum of its digits raised to the consecutive powers (equivalent to the base-10 sequence A032799). 1 raised to any consecutive power is still 1 and thus any sum of digits raised to consecutive powers for any n > 1 falls short of equaling the value of n by the n-th term of this sequence. - Alonso del Arte, Jul 27 2004
Also the number of trailing zeros in the base-2 representation of n!. - Hieronymus Fischer, Jun 18 2007
Partial sums of A007814. - Philippe Deléham, Jun 21 2012
If n is in A089633 and n > 0, then a(n) = n - floor(log_2(n+1)). - Douglas Latimer, Jul 25 2012
For n > 1, denominators of integral numerator polynomials L(n,x) for the Legendre polynomials with o.g.f. 1/sqrt(1 - t*x + x^2). - Tom Copeland, Feb 04 2016
The definition of this sequence explains why, for n > 1, the highest power of 2 dividing n! added to the number of 1's in the binary expansion of n is equal to n. This result is due to the French mathematician Adrien Legendre (1752-1833) [see the Honsberger reference]. - Bernard Schott, Apr 07 2017
a(n) is the total number of 2's in the prime factorizations over the first n positive integers. The expected number of 2's in the factorization of an integer n is 1 (as n->infinity). Generally, the expected number of p's (for a prime p) is 1/(p-1). - Geoffrey Critzer, Jun 05 2017

Examples

			a(3) = 1 because 3 in binary is 11 (two 1's) and 3 - 2 = 1.
a(4) = 3 because 4 in binary is 100 (one 1 and two 0's) and 4 - 1 = 3.
a(5) = 3 because 5 in binary is 101 (a zero between two 1's) and 5 - 2 = 3.
a(100) = 97.
a(10^3) = 994.
a(10^4) = 9995.
a(10^5) = 99994.
a(10^6) = 999993.
a(10^7) = 9999992.
a(10^8) = 99999988.
a(10^9) = 999999987.
G.f. = x^2 + x^3 + 3*x^4 + 3*x^5 + 4*x^6 + 4*x^7 + 7*x^8 + 7*x^9 + 8*x^10 + ...
		

References

  • K. Atanassov, On Some of Smarandache's Problems, section 7, on the 61st problem, page 42, American Research Press, 1999, 16-21.
  • G. Bachman, Introduction to p-Adic Numbers and Valuation Theory, Academic Press, 1964; see Lemma 3.1.
  • L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 305.
  • H. Davenport, The Higher Arithmetic, 7th ed. 1999, Cambridge University Press, p. 216, exercise 1.07.
  • R. Honsberger, Mathematical Gems II, Dolciani Mathematical Expositions, 1976, pp. 1-6.

Crossrefs

a(n) = Sum_{k=1..n} A007814(k), n >= 1, a(0) = 0.

Programs

  • Haskell
    a011371 n = n - a000120 n  -- Reinhard Zumkeller, Jan 24 2014
    
  • Magma
    [Valuation(Factorial(n), 2): n in [0..80]]; // Bruno Berselli, Aug 05 2013
    
  • Maple
    A011371(n) = RETURN(((2^(l))-1)+sum('(j*floor((n-(2^l)+2^j)/(2^(j+1))))','j'=1..l)); # after K. Atanassov. Here l is [ log2(n) ].
    A011371 := n -> n - add(i,i=convert(n,base,2)): # Peter Luschny, May 02 2009
    read("transforms") : A011371 := proc(n) n-wt(n) ; end proc: # R. J. Mathar, May 15 2013
  • Mathematica
    -1 + Length[ Last[ Split[ IntegerDigits[ 2(n!), 2 ] ] ] ], FoldList[ Plus, 0, Fold[ Flatten[ {#1, #2, #1} ]&, 0, Range[ 6 ] ] ]
    Table[IntegerExponent[n!, 2], {n, 0, 127}]
    Table[n - DigitCount[n, 2, 1], {n, 0, 127}]
    Table[t = 0; p = 2; While[s = Floor[n/p]; t = t + s; s > 0, p *= 2]; t, {n, 0, 100} ]
  • PARI
    {a(n) = if( n<0, 0, valuation(n!, 2))}; /* Michael Somos, Oct 24 2002 */
    
  • PARI
    {a(n) = if( n<0, 0, sum(k=1, n, n\2^k))}; /* Michael Somos, Oct 24 2002 */
    
  • PARI
    {a(n) = if( n<0, 0, n - subst( Pol( binary( n ) ), x, 1))}; /* Michael Somos, Aug 28 2007 */
    
  • PARI
    a(n)=sum(k=1,log(n+1)\log(2),n>>k) \\ Charles R Greathouse IV, Oct 03 2012
    
  • PARI
    a(n)=my(s);while(n>>=1,s+=n);s \\ Charles R Greathouse IV, Aug 09 2013
    
  • PARI
    a(n) = n - hammingweight(n); \\ Michel Marcus, Jun 05 2014
    
  • Python
    [n - bin(n)[2:].count("1") for n in range(101)] # Indranil Ghosh, Apr 09 2017
    
  • Python
    # 3.10+
    def A011371(n): return n-n.bit_count() # Chai Wah Wu, Jul 09 2022

Formula

a(n) = a(floor(n/2)) + floor(n/2) = floor(n/2) + floor(n/4) + floor(n/8) + floor(n/16) + ... - Henry Bottomley, Apr 24 2001
G.f.: A(x) = (1/(1 - x))*Sum_{k>=1} x^(2^k)/(1 - x^(2^k)). - Ralf Stephan, Apr 11 2002
a(n) = n - A000120(n). - Lekraj Beedassy, Sep 01 2003
a(n) = A005187(n) - n, n >= 0.
a(n) = A007814(A000142(n)). - Reinhard Zumkeller, Apr 09 2004
From Hieronymus Fischer, Jun 25 and Aug 13 2007: (Start)
a(n) = Sum_{k=2..n} Sum_{j|k, j >= 2} (floor(log_2(j)) - floor(log_2(j - 1))).
The g.f. can be expressed in terms of a Lambert series, in that g(x) = L[b(k)](x)/(1 - x), where
L[b(k)](x) = Sum_{k>=0} b(k)*x^k/(1 - x^k) is a Lambert series with b(k) = 1, if k is a power of 2, otherwise b(k) = 0.
G.f.: g(x) = (1/(1-x))*Sum_{k>0} c(k)*x^k, where c(k) = Sum_{j>1, j|k} (floor(log_2(j)) - floor(log_2(j-1))).
Recurrence:
a(n) = floor(n/2) + a(floor(n/2));
a(2*n) = n + a(n);
a(n*2^m) = n*(2^m - 1) + a(n).
a(2^m) = 2^m - 1, m >= 0.
Asymptotic behavior:
a(n) = n + O(log(n)),
a(n+1) - a(n) = O(log(n)), which follows from the inequalities below.
a(n) <= n - 1; equality holds for powers of 2.
a(n) >= n - 1 - floor(log_2(n)); equality holds for n = 2^m - 1, m > 0.
lim inf (n - a(n)) = 1, for n->oo.
lim sup (n - log_2(n) - a(n)) = 0, for n->oo.
lim sup (a(n+1) - a(n) - log_2(n)) = 0, for n->oo. (End)
a(n) = Sum_{k >= 0} A030308(n, k)*A000225(k). - Philippe Deléham, Oct 16 2011
a(n) = Sum_{k=0..floor(log_2(n+1))} f^(k+1)(n), where f(n) = (n - (n mod 2))/2 and f^(k+1) is the (k+1)-th composition of f. - Joseph Wheat, Mar 01 2018
a(n) = Sum_{k=1..floor(n/2)} floor(log_2(n/k)). - Ammar Khatab, Feb 01 2025

Extensions

Examples added by Hieronymus Fischer, Jun 06 2012

A075771 Let n^2 = q*prime(n) + r with 0 <= r < prime(n); then a(n) = q + r.

Original entry on oeis.org

1, 2, 5, 4, 5, 12, 17, 10, 15, 16, 31, 36, 9, 28, 41, 48, 57, 24, 31, 50, 9, 16, 37, 48, 49, 76, 15, 42, 85, 116, 79, 114, 137, 52, 41, 96, 121, 148, 27, 52, 79, 144, 139, 16, 65, 136, 109, 84, 141, 220, 49, 86, 169, 166, 209, 254, 33, 124, 169, 240, 55, 48, 297, 66
Offset: 1

Views

Author

Werner D. Sand, Oct 09 2002

Keywords

Comments

The digital sum (base the n-th prime) of n^2.
A lower bound is a(n) >= n^2/prime(n) ~ n/log(n log n). No term less than this can occur after index n, e.g., a(n) > 126 for n > 10^3 and a(n) > 954 for n > 10^4. "Late birds" (such that a(k) > a(n) for all k > n) are a(1) = 1, a(2) = 2, a(4) = 4, a(5) = 5, a(21) = 9, a(27) = 15, a(44) = 16, a(104) = 24, a(173) = 59, a(365) = 61, a(369) = 81, a(500) = 100, a(590) = 124, a(735) = 129, a(840) = 152, a(987) = 169, a(1564) = 196, a(1797) = 249, a(2415) = 305, a(3368) = 400, a(3545) = 425, a(4025) = 475, a(4466) = 520, a(5018) = 556, a(5477) = 565, a(6686) = 676, a(7239) = 771, a(8025) = 795, a(8182) = 904, a(9369) = 939, ... Values that occur not less often than any smaller one are: 1, 2, 4 (once), 5, 9, 15 (twice), 16, 48, 64, 86, 100 (three times), 144 (five times), 169 (seven times), ... Values that never occur are: 3, 6, 7, 8, 11, 13, 14, 18, 19, 20, 21, 22, 23, 25, 26, 29, 30, 32, 34, 35, 38, 39, 40, 43, 44, 45, 47, 51, 53, 54, 56, 58, 62, 67, 68, 69, 70, 71, 72, 74, 75, 77, 78, 80, 82, 83, 87, 89, 90, 91, 92, 94, 97, 98, 99, ... - M. F. Hasler, Nov 25 2016

Examples

			6^2/p(6) = 36/13 = 2+10/13; a(6) = 2+10 = 12.
		

Crossrefs

Programs

  • Magma
    [n^2-(NthPrime(n)-1)*Floor(n^2/NthPrime(n)): n in [1..70]]; // Vincenzo Librandi, Feb 18 2015
    
  • Mathematica
    Table[n^2 - (Prime[n] - 1) Floor[n^2 / Prime[n]], {n, 80}] (* Vincenzo Librandi, Feb 18 2015 *)
  • PARI
    a(n) = {my(sq = n^2); my(p = prime(n)); (sq % p) + sq\p;} \\ Michel Marcus, Feb 18 2015
    
  • PARI
    A075771(n)=[1,1]*divrem(n^2,prime(n)) \\ M. F. Hasler, Nov 25 2016

Formula

a(n) = ds_prime(n)(n^2), where ds_prime(n) = digital sum base the n-th prime.
a(n) = n^2 - (prime(n)-1)*floor(n^2/prime(n)). For example, a(2) = ds_prime(2)(2^2) = ds_3(4) = 1 + 1 = 2; a(6) = ds_prime(6)(6^2) = ds_13(36) = 2 + 10 = 12.

A046253 Equal to the sum of its nonzero digits raised to its own power.

Original entry on oeis.org

0, 1, 3435, 438579088
Offset: 1

Views

Author

Patrick De Geest, May 15 1998

Keywords

Comments

A variant of Münchausen numbers, cf. A166623.
The sequence is finite, because the sum can't exceed 9^9*L < 10^9*L, where L is the number of digits, and for L > 10 this is less than the number N >= 10^(L-1). - M. F. Hasler, Oct 01 2024

Examples

			3435 = 3^3 + 4^4 + 3^3 + 5^5.
		

References

  • J. S. Madachy, "Madachy's Mathematical Recreations", Dover N.Y., pp. 163-175.
  • C. A. Pickover, "Keys to Infinity", Wiley 1995, Ch. 22, pp. 169-171.
  • Alfred S. Posamentier, Math Charmers, Tantalizing Tidbits for the Mind, Prometheus Books, NY, 2003, page 37.
  • David Wells, "Curious and Interesting Numbers", Penguin 1988, pp. 169, 190.

Crossrefs

Fixed points of A045512. See also A045503 (includes zero digits).

Programs

  • C
    // See Bailey and Hutchens links
    
  • Mathematica
    Select[Range[0,10000],Total[#^#&/@DeleteCases[IntegerDigits@#,0]]==#&]  (* Giorgos Kalogeropoulos, May 08 2019 *)
  • PARI
    select( {is_A046253(n)=n==A045512(n)}, [0..10^4]) \\ To find the 4th solution, multiply the set by 51817. - M. F. Hasler, Oct 01 2024

A035138 Integers that are equal to the sum of ascending numbers raised to their digits powers.

Original entry on oeis.org

1, 594, 746, 986, 1000000009
Offset: 1

Views

Author

Patrick De Geest, Nov 15 1998

Keywords

Examples

			594: 1^5 + 2^9 + 3^4 = 1 + 512 + 81 = 594.
		

Crossrefs

Cf. A032799.

Programs

A208130 Numbers that when expressed in decimal are equal to the sum of the digits sorted into nondecreasing order and raised to the powers 1, 2, 3, ...

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 89, 135, 2537, 60409, 4901732, 17735872, 45279768, 393470463, 3623008669, 3893095238, 229386834955666, 1892713761283624, 1501212693940707502, 1517944702855898904, 12303679765763687463, 122947811178635339597, 1095354314191826124704, 1106509957063490820877
Offset: 1

Views

Author

Francis J. McDonnell, Mar 29 2012

Keywords

Comments

Lemma: The sequence is finite with all terms in the sequence having at most 22 digits. Proof: Let n be an m-digit natural number in the sequence for some m. Then 10^(m-1) <= n and n <= 9 + 9^2 + ... + 9^m = 9(9^m-1)/8 < (9^(m+1))/8. Thus 10^(m-1) < (9^(m+1))/8. Taking logarithms of both sides and solving yields m < 22.97. QED. The sequence listed, found by a computer program searching up to 10^22, is therefore complete. - Francis J. McDonnell, Apr 12 2012

Examples

			2537 = 2^1 + 3^2 + 5^3 + 7^4 = 2 + 9 + 125 + 2401.
60409 = 0^1 + 0^2 + 4^3 + 6^4 + 9^5 = 0 + 0 + 64 + 1296 + 59049.
		

Crossrefs

Cf. A032799 (does not sort the digits prior to raising to powers).

Programs

  • Java
    // See McDonnell link.
    
  • Python
    from itertools import combinations_with_replacement
    A208130_list = []
    for l in range(1,23):
        for n in combinations_with_replacement(range(10),l):
            x = sum(b**(a+1) for a,b in enumerate(n))
            if x > 0 and tuple(sorted(int(d) for d in str(x))) == n:
                A208130_list.append(x)
    A208130_list = sorted(A208130_list)  # Chai Wah Wu, May 20 2017

Extensions

More terms added by Francis J. McDonnell, Apr 12 2012
Faster program used to obtain more terms included by Francis J. McDonnell, Apr 16 2012

A112719 Numbers m such that pi(m) = d_1^1 + d_2^2 + ... + d_k^k where d_1 d_2 ... d_k is the decimal expansion of m.

Original entry on oeis.org

0, 12, 160, 253, 382, 3664, 4683, 9285, 66290, 207735, 390481, 3748380, 7884391, 9136095, 11187665, 12690170, 15008945, 32067066, 34152082, 43470982, 311506482, 315458182, 317195680, 317583584, 789530607, 803190747, 818360167
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 17 2005

Keywords

Comments

This sequence is finite and the largest term is less than 10^73.

Examples

			43470982 is in the sequence because pi(43470982) = 4^1 + 3^2 + 4^3 + 7^4 + 0^5 + 9^6 + 8^7 + 2^8 = 2631327.
		

Crossrefs

Programs

  • Mathematica
    Do[d=IntegerDigits[n];k=Length[d];If[PrimePi[n]==Sum[d[[j]]^j, {j, k}], Print[n]], {n, 0, 170000000}]

Extensions

a(21)-a(27) from Donovan Johnson, Nov 09 2010

A362843 Numbers that are equal to the sum of their digits raised to consecutive odd numbered powers (1,3,5,7,...).

Original entry on oeis.org

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

Views

Author

Wolfe Padawer, May 05 2023

Keywords

Comments

Unlike A032799 and A208130, this sequence is not easily proven to be finite. With m >= 1, 10^(m - 1) exceeds 9^1 + 9^2 + ... + 9^m when m is approximately 22.97, meaning it is impossible for an integer with 23 or more digits to be equal to the sum of its digits raised to the consecutive powers. However, 10^(m - 1) will never exceed 9^1 + 9^3 + ... + 9^(2m - 1) over m >= 1. It appears that 10^(m - 1) will never exceed 9^1 + 9^(1 + x) + 9^(1 + 2x) ... 9^(mx - x + 1) over m >= 1 when x >= A154160, approximately 1.04795. For A032799, x = 1, and for this sequence, x = 2. This means this sequence could theoretically be infinite, although it is currently unknown whether it is.
a(14) > 10^24 if it exists. The expected number of k-digit terms can be heuristically estimated as about 10^(-0.15*k), which suggests that the sequence is likely finite. - Max Alekseyev, May 17 2025

Examples

			1 = 1^1;
463 = 4^1 + 6^3 + 3^5;
3943 = 3^1 + 9^3 + 4^5 + 3^7.
		

Crossrefs

Programs

  • Mathematica
    kmax=10^6; a={}; For[k=0, k<=kmax, k++,If[Sum[Part[IntegerDigits[k],i]^(2i-1),{i,IntegerLength[k]}]==k, AppendTo[a,k]]]; a (* Stefano Spezia, May 06 2023 *)
  • PARI
    isok(k) = my(d=digits(k)); sum(i=1, #d, d[i]^(2*i-1)) == k; \\ Michel Marcus, May 06 2023
    
  • Python
    from itertools import count, islice
    def A362843_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:n==sum(int(d)**((i<<1)+1) for i,d in enumerate(str(n))),count(max(startvalue,0)))
    A362843_list = list(islice(A362843_gen(),12)) # Chai Wah Wu, Jun 26 2023

Extensions

a(13) from Martin Ehrenstein, Jul 07 2023

A112721 Numbers m such that phi(m) = d_1^1 + d_2^2 + ... + d_k^k where d_1 d_2 ... d_k is the decimal expansion of m.

Original entry on oeis.org

1, 44, 84, 5676, 32186, 35097, 128476, 527048, 700298, 12141094, 43874279, 58730238, 303387848, 2277279428
Offset: 1

Views

Author

Farideh Firoozbakht, Sep 17 2005

Keywords

Comments

a(15) > 6*10^10. - Donovan Johnson, Nov 09 2010
All terms of this sequence are less than 2 * 10^42. - Charles R Greathouse IV, May 11 2012
a(15) > 10^12. - Giovanni Resta, Apr 12 2017

Examples

			phi(12141094) = 1^1 + 2^2 + 1^3 + 4^4 + 1^5 + 0^6 + 9^7 + 4^8 = 4848768 so 12141094 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    Do[d=IntegerDigits[n];k=Length[d];If[EulerPhi[n]==Sum[d[[j]]^j, {j, k}], Print[n]], {n, 30000000}]

Extensions

a(11)-a(12) from Farideh Firoozbakht, Jan 04 2009
a(13)-a(14) from Donovan Johnson, Nov 09 2010

A347189 Positive integers that can be expressed as the sum of powers of their digits (from right to left) with consecutive natural exponents.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 332, 1676, 121374, 4975929, 134116265, 1086588775, 3492159897, 8652650287, 8652650482
Offset: 1

Views

Author

Reiner Moewald, Aug 21 2021

Keywords

Comments

Any number > 9 consisting of just one digit (A014181) can't be in the list. (Provable using the Carmichael function.)

Examples

			24 = 4^2 + 2^3 is a term.
332 = 2^3 + 3^4 + 3^5 is another term.
		

Crossrefs

Programs

  • Python
    liste = []
    for ex in range(0, 20):
        for t in range(1, 10000):
            n = t
            pot = ex
            ergebnis = 0
            while n > 0:
                pot = pot + 1
                rest = n % 10
                n = (n - rest) // 10
                zw = 1
                for i in range(pot):
                    zw = zw * rest
                ergebnis = ergebnis + zw
            if (int(ergebnis) == t) and (t not in liste):
                liste.append(t)
    liste.sort()
    print(liste)
    
  • Python
    def powsum(digits, startexp):
        return sum(digits[i]**(startexp+i) for i in range(len(digits)))
    def ok(n):
        if n < 10: return True
        s = str(n)
        if set(s) <= {'0', '1'}: return False
        digits, startexp = list(map(int, s))[::-1], 1
        while powsum(digits, startexp) < n: startexp += 1
        return n == powsum(digits, startexp)
    print(list(filter(ok, range(2*10**5)))) # Michael S. Branicky, Aug 29 2021

Extensions

a(15)-a(19) from Michael S. Branicky, Aug 31 2021

A377012 Numbers k whose digits can be split into substrings so that the sum of these substrings raised to consecutive powers (1, 2, 3, ...) is the number k itself.

Original entry on oeis.org

89, 135, 175, 518, 598, 1306, 1370, 1371, 1676, 2045, 2427, 3055, 5755, 5918, 9899, 11053, 24429, 88297, 135010, 234322, 255050, 255051, 360030, 360031, 494703, 512780, 517380, 568217, 767368, 779243, 785920, 785921, 788834, 819116, 931316, 986562, 998999, 1000100
Offset: 1

Views

Author

Francesco Di Matteo, Oct 28 2024

Keywords

Comments

At least two substrings are required and each substring must have at least one digit.
A subsequence is A032799 (except for 1-digit numbers).
Unlike A032799, which is finite, this sequence is infinite because; e.g., the pattern 89, 9899, 998999, ... can always be split into two equal-length substrings that generate a term as (10^i - 2)^1 + (10^i - 1)^2 = 10^i*(10^i - 2) + (10^i - 1) for all i > 0.
Leading zeros in strings are allowed here. The first such term generated by the author's program is 1010053 = 1^1 + (01005)^2 + 3^3. - Michael S. Branicky, Nov 30 2024
Another pattern is deduced from a(38) = 1000100 = 100^1 + 0^2 + 100^3 with formula (10^i)^1 + 0^2 + ... + 0^n + ([0...0]10^i)^(n+1) = (10^i)^(n+1) + 10^i with i > 1 and n > 1. - Francesco Di Matteo, Jan 15 2025

Examples

			175 = 1^1 + 7^2 + 5^3 is a term.
5755 = 5^1 + 75^2 + 5^3 is a term.
88297 = 88^1 + 297^2 is a term.
234322 = 23^1 + 4^2 + 3^3 + 22^4 is a term.
		

Crossrefs

Programs

  • Python
    import itertools
    analys = range(1, 7) # increase this if you want
    for limite in analys:
        numbers = range(pow(10,limite-1),pow(10,limite))
        r = range(1, limite+1)
        disp_temp = []
        for s in r:
            disp = list(itertools.product(r, repeat=s+1))
            disp_temp.extend(disp)
        disp_ok = [d for d in disp_temp if sum(d)==limite]
        for numero in numbers:
            str_numero = str(numero)
            for combo in disp_ok:
                k = limite
                totale = 0
                for c in range(len(combo), 0, -1):
                    partenza = k-combo[c-1]
                    porzione = str_numero[partenza:k]
                    if c == 1:
                        totale = totale + int(porzione)
                    else:
                        totale = totale + pow(int(porzione),c)
                    k = k - combo[c-1]
                if totale == numero:
                    print(numero)
Showing 1-10 of 12 results. Next