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

A036965 Record values of the product of the exponents in the prime factorization of highly powerful numbers (A005934).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 16, 18, 20, 21, 24, 25, 28, 30, 32, 35, 36, 40, 42, 45, 48, 50, 54, 56, 60, 63, 64, 72, 75, 84, 90, 96, 105, 108, 112, 120, 126, 128, 135, 140, 144, 150, 160, 162, 168, 180, 192, 200, 210, 216, 220, 224, 225, 240, 252, 256, 270
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    Union@ FoldList[Max, Array[Times @@ FactorInteger[#][[All, -1]] &, 10^7]] (* Michael De Vlieger, Oct 15 2017 *)

Formula

a(n) = A005361(A005934(n)). - Amiram Eldar, May 13 2019

Extensions

Reference gives an extensive table.
More terms from Naohiro Nomoto, Jul 25 2001

A307703 Highly powerful numbers (A005934) that are not cubeful (A036966).

Original entry on oeis.org

4, 144, 288, 86400, 129600, 194400, 259200, 518400, 190512000, 317520000, 381024000, 635040000, 9681819840000, 215982036990720000, 9466852651364908800000, 14200278977047363200000, 28400557954094726400000, 174294224164279335916800000, 522882672492838007750400000
Offset: 1

Views

Author

Amiram Eldar, Apr 22 2019

Keywords

Comments

Lacampagne and Selfridge proved that these are the only terms.
The positions of the terms in A005934 are 2, 8, 10, 25, 27, 28, 30, 33, 55, 58, 60, 62, 107, 161, 230, 234, 240, 302, 315.

Crossrefs

Programs

  • Mathematica
    pmax = 1; s = {}; Do[e = FactorInteger[n][[;; , 2]]; p = Times @@ e; If[p > pmax, pmax = p; If[Min[e] < 3, AppendTo[s, n]]], {n, 2, 10^6}]; s

A001694 Powerful numbers, definition (1): if a prime p divides n then p^2 must also divide n (also called squareful, square full, square-full or 2-powerful numbers).

Original entry on oeis.org

1, 4, 8, 9, 16, 25, 27, 32, 36, 49, 64, 72, 81, 100, 108, 121, 125, 128, 144, 169, 196, 200, 216, 225, 243, 256, 288, 289, 324, 343, 361, 392, 400, 432, 441, 484, 500, 512, 529, 576, 625, 648, 675, 676, 729, 784, 800, 841, 864, 900, 961, 968, 972, 1000
Offset: 1

Views

Author

Keywords

Comments

Numbers of the form a^2*b^3, a >= 1, b >= 1.
In other words, if the prime factorization of n is Product_k p_k^e_k then all e_k are greater than 1.
Numbers n such that Sum_{d|n} phi(d)*phi(n/d)*mu(d) > 0; places of nonzero A300717. - Benoit Cloitre, Nov 30 2002
This sequence is closed under multiplication. The primitive elements are A168363. - Franklin T. Adams-Watters, May 30 2011
Complement of A052485. - Reinhard Zumkeller, Sep 16 2011
The number of terms less than or equal to 10^k beginning with k = 0: 1, 4, 14, 54, 185, 619, 2027, 6553, 21044, ...: A118896. - Robert G. Wilson v, Aug 11 2014
a(10^n): 1, 49, 3136, 253472, 23002083, 2200079025, 215523459072, 21348015504200, 2125390162618116, ... . - Robert G. Wilson v, Aug 15 2014
a(m) mod prime(n) > 0 for m < A258599(n); a(A258599(n)) = A001248(n) = prime(n)^2. - Reinhard Zumkeller, Jun 06 2015
From Des MacHale, Mar 07 2021: (Start)
A number m is powerful if and only if |R/Z(R)| = m, for some finite non-commutative ring R.
A number m is powerful if and only if |G/Z(G)| = m, for some finite nilpotent class two group G (Reference Aine Nishe). (End)
Numbers n such that Sum_{k=1..n} phi(gcd(n,k))*mu(gcd(n,k)) > 0. - Richard L. Ollerton, May 09 2021

Examples

			1 is a term because for every prime p that divides 1, p^2 also divides 1.
2 is not a term since 2 divides 2 but 2^2 does not.
4 is a term because 2 is the only prime that divides 4 and 2^2 does divide 4. - _N. J. A. Sloane_, Jan 16 2022
		

References

  • G. E. Hardy and M. V. Subbarao, Highly powerful numbers, Congress. Numer. 37 (1983), 277-307.
  • Aleksandar Ivić, The Riemann Zeta-Function, Wiley, NY, 1985, see p. 407.
  • Richard A. Mollin, Quadratics, CRC Press, 1996, Section 1.6.
  • Aine NiShe, Commutativity and Generalisations in Finite Groups, Ph.D. Thesis, University College Cork, 2000.
  • Paulo Ribenboim, Meine Zahlen, meine Freunde, 2009, Springer, 9.1 Potente Zahlen, pp. 241-247.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Gérald Tenenbaum, Introduction to analytic and probabilistic number theory, Cambridge University Press, 1995, p. 54, exercise 10 (in the third edition 2015, p. 63, exercise 70).

Crossrefs

Disjoint union of A062503 and A320966.
Cf. A007532 (Powerful numbers, definition (2)), A005934, A005188, A003321, A014576, A023052 (Powerful numbers, definition (3)), A046074, A013929, A076871, A258599, A001248, A112526, A168363, A224866, A261883, A300717.
Cf. A052485 (complement), A076446 (first differences), A376361, A376362.

Programs

  • Haskell
    a001694 n = a001694_list !! (n-1)
    a001694_list = filter ((== 1) . a112526) [1..]
    -- Reinhard Zumkeller, Nov 30 2012
    
  • Maple
    isA001694 := proc(n) for p in ifactors(n)[2] do if op(2,p) = 1 then return false; end if; end do; return true; end proc:
    A001694 := proc(n) option remember; if n = 1 then 1; else for a from procname(n-1)+1 do if isA001694(a) then return a; end if; end do; end if; end proc:
    seq(A001694(n),n=1..20) ; # R. J. Mathar, Jun 07 2011
  • Mathematica
    Join[{1}, Select[ Range@ 1250, Min@ FactorInteger[#][[All, 2]] > 1 &]]
    (* Harvey P. Dale, Sep 18 2011; modified by Robert G. Wilson v, Aug 11 2014 *)
    max = 10^3; Union@ Flatten@ Table[a^2*b^3, {b, max^(1/3)}, {a, Sqrt[max/b^3]}] (* Robert G. Wilson v, Aug 11 2014 *)
    nextPowerfulNumber[n_] := Block[{r = Range[ Floor[1 + n^(1/3)]]^3}, Min@ Select[ Sort[ r*Floor[1 + Sqrt[n/r]]^2], # > n &]]; NestList[ nextPowerfulNumber, 1, 55] (* Robert G. Wilson v, Aug 16 2014 *)
  • PARI
    isA001694(n)=n=factor(n)[,2];for(i=1,#n,if(n[i]==1,return(0)));1 \\ Charles R Greathouse IV, Feb 11 2011
    
  • PARI
    list(lim,mn=2)=my(v=List(),t); for(m=1,sqrtnint(lim\1,3), t=m^3; for(n=1,sqrtint(lim\t), listput(v,t*n^2))); Set(v) \\ Charles R Greathouse IV, Jul 31 2011; edited Sep 22 2015
    
  • PARI
    is=ispowerful \\ Charles R Greathouse IV, Nov 13 2012
    
  • Python
    from sympy import factorint
    A001694 = [1]+[n for n in range(2,10**6) if min(factorint(n).values()) > 1]
    # Chai Wah Wu, Aug 14 2014
    
  • Python
    from math import isqrt
    from sympy import mobius, integer_nthroot
    def A001694(n):
        def squarefreepi(n):
            return int(sum(mobius(k)*(n//k**2) for k in range(1, isqrt(n)+1)))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x):
            c, l = n+x, 0
            j = isqrt(x)
            while j>1:
                k2 = integer_nthroot(x//j**2,3)[0]+1
                w = squarefreepi(k2-1)
                c -= j*(w-l)
                l, j = w, isqrt(x//k2**3)
            c -= squarefreepi(integer_nthroot(x,3)[0])-l
            return c
        return bisection(f,n,n) # Chai Wah Wu, Sep 09 2024
    
  • Sage
    sloane.A001694.list(54) # Peter Luschny, Feb 08 2015

Formula

A112526(a(n)) = 1. - Reinhard Zumkeller, Sep 16 2011
Bateman & Grosswald prove that there are zeta(3/2)/zeta(3) x^{1/2} + zeta(2/3)/zeta(2) x^{1/3} + O(x^{1/6}) terms up to x; see section 5 for a more precise error term. - Charles R Greathouse IV, Nov 19 2012
a(n) = A224866(n) - 1. - Reinhard Zumkeller, Jul 23 2013
Sum_{n>=1} 1/a(n) = zeta(2)*zeta(3)/zeta(6). - Ivan Neretin, Aug 30 2015
Sum_{n>=1} 1/a(n)^s = zeta(2*s)*zeta(3*s)/zeta(6*s), s > 1/2 (Golomb, 1970). - Amiram Eldar, Oct 02 2022

Extensions

More terms from Henry Bottomley, Mar 16 2000
Definition expanded by Jonathan Sondow, Jan 03 2016

A005188 Armstrong (or pluperfect, or Plus Perfect, or narcissistic) numbers: m-digit positive numbers equal to sum of the m-th powers of their digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 8208, 9474, 54748, 92727, 93084, 548834, 1741725, 4210818, 9800817, 9926315, 24678050, 24678051, 88593477, 146511208, 472335975, 534494836, 912985153, 4679307774, 32164049650, 32164049651
Offset: 1

Views

Author

Keywords

Comments

A finite sequence, the 88th and last term being 115132219018763992565095597973971522401.
Let k = d_1 d_2 ... d_n in base 10; then k is in the sequence iff k = Sum_{i=1..n} d_i^n.
These are the fixed points in the "Recurring Digital Invariant Variant" described in A151543.
a(15) = A229381(3) = 8208 is the "Simpsons' narcissistic number".
If a(n) is a multiple of 10, then a(n+1) = a(n) + 1, and if a(n) == 1 (mod 10) then a(n-1) = a(n) - 1 except for n = 1, cf. Examples. - M. F. Hasler, Oct 18 2018
Named after Michael Frederick Armstrong (1941-2020), who used these numbers in his computing class at the University of Rochester in the mid 1960's. - Amiram Eldar, Mar 09 2024

Examples

			153 = 1^3 + 5^3 + 3^3,
8208 = 8^4 + 2^4 + 0^4 + 8^4,
4210818 = 4^7 + 2^7 + 1^7 + 0^7 + 8^7 + 1^7 + 8^7.
The eight terms 370, 24678050, 32164049650, 4338281769391370, 3706907995955475988644380, 19008174136254279995012734740, 186709961001538790100634132976990 and 115132219018763992565095597973971522400 end in a digit zero, therefore their successor a(n) + 1 is the next term a(n+1). This also yields the last term of the sequence. The initial a(1) = 1 is the only term ending in a digit 1 not preceded by a(n) - 1. - _M. F. Hasler_, Oct 18 2018
		

References

  • Jean-Marie De Koninck, Ces nombres qui nous fascinent, Entry 88, pp. 30-31, Ellipses, Paris 2008.
  • Lionel E. Deimel, Jr. and Michael T. Jones, Finding Pluperfect Digital Invariants: Techniques, Results and Observations, J. Rec. Math., 14 (1981), 87-108.
  • Jean-Pierre Lamoitier, Fifty Basic Exercises. SYBEX Inc., 1981.
  • Clifford A. Pickover, A Passion for Mathematics, Wiley, 2005; see p. 68.
  • Alfred S. Posamentier, Numbers: Their Tales, Types, and Treasures, Prometheus Books, 2015, pp. 242-244.
  • Joe Roberts, The Lure of the Integers, The Mathematical Association of America, 1992, page 36.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Similar to but different from A023052.
Cf. A151543.
Cf. A010343 to A010354 (bases 4 to 9). - R. J. Mathar, Jun 28 2009

Programs

  • Maple
    filter:= proc(k) local d;
    d:= 1 + ilog10(k);
    add(s^d, s=convert(k,base,10)) = k
    end proc:
    select(filter, [$1..10^6]); # Robert Israel, Jan 02 2015
  • Mathematica
    f[n_] := Plus @@ (IntegerDigits[n]^Floor[ Log[10, n] + 1]); Select[ Range[10^7], f[ # ] == # &] (* Robert G. Wilson v, May 04 2005 *)
    Select[Range[10^7],#==Total[IntegerDigits[#]^IntegerLength[#]]&] (* Harvey P. Dale, Sep 30 2011 *)
  • PARI
    is(n)=my(v=digits(n));sum(i=1,#v,v[i]^#v)==n \\ Charles R Greathouse IV, Nov 20 2012
    
  • PARI
    select( is_A005188(n)={n==vecsum([d^#n|d<-n=digits(n)])}, [0..9999]) \\ M. F. Hasler, Nov 18 2019
    
  • Python
    from itertools import combinations_with_replacement
    A005188_list = []
    for k in range(1,10):
        a = [i**k for i in range(10)]
        for b in combinations_with_replacement(range(10),k):
            x = sum(map(lambda y:a[y],b))
            if x > 0 and tuple(int(d) for d in sorted(str(x))) == b:
                A005188_list.append(x)
    A005188_list = sorted(A005188_list) # Chai Wah Wu, Aug 25 2015

Extensions

32164049651 from Amit Munje (amit.munje(AT)gmail.com), Oct 07 2006
In order to agree with the Definition, first comment modified by Jonathan Sondow, Jan 02 2015
Comment in name moved to comment section and links edited by M. F. Hasler, Oct 18 2018
"Positive" added to definition by N. J. A. Sloane, Nov 18 2019

A023052 Perfect Digital Invariants: numbers that are the sum of some fixed power of their digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 153, 370, 371, 407, 1634, 4150, 4151, 8208, 9474, 54748, 92727, 93084, 194979, 548834, 1741725, 4210818, 9800817, 9926315, 14459929, 24678050, 24678051, 88593477, 146511208, 472335975, 534494836, 912985153
Offset: 1

Views

Author

Keywords

Comments

The old name was "Powerful numbers, definition (3)". Cf. A001694, A007532. - N. J. A. Sloane, Jan 16 2022.
Randle has suggested that these numbers be called "powerful", but this usually refers to a distinct property related to prime factorization, cf. A001694, A036966, A005934.
Numbers m such that m = Sum_{i=1..k} d(i)^s for some s, where d(1..k) are the decimal digits of m.
Superset of A005188 (Plusperfect, narcissistic or Armstrong numbers: s=k), A046197 (s=3), A052455 (s=4), A052464 (s=5), A124068 (s=6, 7), A124069 (s=8). - R. J. Mathar, Jun 15 2009, Jun 22 2009

Examples

			153 = 1^3 + 5^3 + 3^3, 4210818 = 4^7 + 2^7 + 1^7 + 0^7 + 8^7 + 1^7 + 8^7.
		

Crossrefs

Cf. A001694 (powerful numbers: p|n => p^2|n), A005934 (highly powerful numbers).
Cf. A005188 (here the power must be equal to the number of digits).
In other bases: A162216 (base 3), A162219 (base 4), A162222 (base 5), A162225 (base 6), A162228 (base 7), A162231 (base 8), A162234 (base 9).

Programs

  • Mathematica
    Select[Range[0, 10^5], Function[m, AnyTrue[Function[k, Total@ Map[Power[#, k] &, IntegerDigits@ m]] /@ Range@ 10, # == m &]]] (* Michael De Vlieger, Feb 08 2016, Version 10 *)
  • PARI
    is(n)=if(n<10, return(1)); my(d=digits(n),m=vecmax(d)); if(m<2, return(0)); for(k=3,logint(n,m), if(sum(i=1,#d,d[i]^k)==n, return(1))); 0 \\ Charles R Greathouse IV, Feb 06 2017
    
  • PARI
    select( is_A023052(n,b=10)={nn|| return(t==n))}, [0..10^5]) \\  M. F. Hasler, Nov 21 2019

Extensions

Computed to 10^50 by G. N. Gusev (GGN(AT)rm.yaroslavl.ru)
Computed to 10^74 by Xiaoqing Tang
A-number typo corrected by R. J. Mathar, Jun 22 2009
Computed to 10^105 by Joseph Myers
Cross-references edited by Joseph Myers, Jun 28 2009
Edited by M. F. Hasler, Nov 21 2019

A307958 Coreful perfect numbers: numbers k such that csigma(k) = 2*k, where csigma(k) is the sum of the coreful divisors of k (A057723).

Original entry on oeis.org

36, 180, 252, 392, 396, 468, 612, 684, 828, 1044, 1116, 1176, 1260, 1332, 1476, 1548, 1692, 1908, 1960, 1980, 2124, 2196, 2340, 2412, 2556, 2628, 2772, 2844, 2988, 3060, 3204, 3276, 3420, 3492, 3636, 3708, 3852, 3924, 4068, 4140, 4284, 4312, 4572, 4716, 4788
Offset: 1

Views

Author

Amiram Eldar, May 08 2019

Keywords

Comments

Hardy and Subbarao defined a coreful divisor d of a number k as a divisor with the same set of distinct prime factors as k, or rad(d) = rad(k), where rad(k) is the largest squarefree divisor of k (A007947). The number of these divisors is A005361(k) and their sum is csigma(k) = A057723(k). Since csigma(k) is multiplicative and csigma(p) = p for prime p, then if k is coreful perfect number, then also m*k is, for any squarefree number m coprime to k, gcd(m, k) = 1. Thus there are infinitely many coreful perfect numbers, and all of them can be generated from the sequence of primitive coreful perfect numbers (A307959), which is the subsequence of powerful terms of this sequence. This sequence and A307959 are analogous to e-perfect numbers (A054979) and primitive e-perfect numbers (A054980).

Examples

			36 is in the sequence since its coreful divisors are 6, 12, 18, 36, whose sum is 72 = 2 * 36.
		

Crossrefs

Programs

  • Mathematica
    f[p_,e_] := (p^(e+1)-1)/(p-1)-1; a[1]=1; a[n_] := Times @@ (f @@@ FactorInteger[n]); s={}; Do[If[a[n] == 2n, AppendTo[s,n]], {n, 1, 10^6}]; s
  • PARI
    rad(n) = factorback(factorint(n)[, 1]); \\ A007947
    s(n) = rad(n)*sigma(n/rad(n)); \\ A057723
    isok(n) = s(n) == 2*n; \\ Michel Marcus, May 14 2019

A003321 Smallest n-th order perfect digital invariant or PDI: smallest number > 1 equal to sum of n-th powers of its digits, or 0 if no such number exists.

Original entry on oeis.org

2, 0, 153, 1634, 4150, 548834, 1741725, 24678050, 146511208, 4679307774, 32164049650, 0, 564240140138, 28116440335967, 0, 4338281769391370, 233411150132317, 0, 1517841543307505039, 63105425988599693916
Offset: 1

Views

Author

Keywords

Comments

Except for the initial term, this is the third column of A252648. - M. F. Hasler, Feb 16 2015
a(n) = 0 if n>1 and in A262094. - Dmitry Kamenetsky, Jun 05 2020

Examples

			1^3 + 5^3 + 3^3 = 153.
1*0^17 + 5*1^17 + 2*2^17 + 4*3^17 + 1*4^17 + 1*5^17 + 1*7^17 = 233411150132317.
		

References

  • M. Gardner, The Magic Numbers of Dr Matrix. Prometheus, Buffalo, NY, 1985, p. 249.
  • J. S. Madachy, Mathematics on Vacation, Thomas Nelson and Sons Ltd. 1966, p. 164.
  • J. S. Madachy, Madachy's Mathematical Recreations, Dover, p. 164.
  • C. A. Pickover, Keys to Infinity. New York: W. H. Freeman, pp. 169-170, 1995.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

In other bases: A033835 (base 3), A033836 (base 4), A033837 (base 5), A033838 (base 6), A033839 (base 7), A033840 (base 8), A033841 (base 9).

Programs

  • PARI
    a(n)=m=1;while(m*9^n>=10^m,m++);for(k=2,10^m,d=digits(k);s=sum(i=1,#d,d[i]^n);if(s==k,return(k)));0
    n=1;while(n<10,print1(a(n),", ");n++) \\ Derek Orr, Dec 19 2014

Extensions

Additional comments from Lekraj Beedassy, May 23 2001
Extended and cross-references edited by Joseph Myers, Jun 28 2009

A085629 Let b(n) equal the product of the exponents in the prime factorization of n. Then a(n) gives the least k such that b(k) = n.

Original entry on oeis.org

1, 4, 8, 16, 32, 64, 128, 144, 216, 288, 2048, 432, 8192, 1152, 864, 1296, 131072, 1728, 524288, 2592, 3456, 18432, 8388608, 5184, 7776, 73728, 13824, 10368, 536870912, 15552, 2147483648, 20736, 55296, 1179648, 31104, 41472, 137438953472, 4718592
Offset: 1

Views

Author

Jason Earls, Jul 10 2003

Keywords

Comments

a(n) <= 2^n. - Robert G. Wilson v, Jul 14 2014
a(n) = 2^n iff n is a prime or n equals 4 or 6. - Robert G. Wilson v, Jul 19 2014

Crossrefs

Cf. A005179.
Subsequence of A181800.

Programs

  • Mathematica
    f[n_, i_] := f[n, i] = Block[{d, b, p, x}, p = Prime[i]; b = p^n; d = Divisors[n]; For[j = Length[d], j > 1, j--, x = d[[j]]; b = Min[b, p^x*f[n/x, i + 1]]]; b]; f[1, 1] = 1; Array[ f[#, 1] &, 42] (* Robert G. Wilson v, Jul 17 2014, after David Wasserman's PARI program below *)
  • PARI
    f(n, i) = local(d, best, p, x); p = prime(i); best = p^n; d = divisors(n); for (j = 2, length(d) - 1, x = d[j]; best = min(best, p^x*f(n/x, i + 1))); best; a(n) = f(n, 1) \\ David Wasserman, Feb 07 2005

Extensions

More terms from David Wasserman, Feb 07 2005

A007532 Handsome numbers: sum of positive powers of its digits; a(n) = Sum_{i=1..k} d[i]^e[i] where d[1..k] are the decimal digits of a(n), e[i] > 0.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 43, 63, 89, 132, 135, 153, 175, 209, 224, 226, 262, 264, 267, 283, 332, 333, 334, 357, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 407, 445, 463, 518, 598, 629, 739, 794, 849, 935, 994, 1034
Offset: 1

Views

Author

Keywords

Comments

The previous name was "Powerful numbers, Definition (2). Cf. A001694, A023052. - N. J. A. Sloane, Jan 16 2022
J. Randle has suggested the name "powerful numbers" for the perfect digital invariants A023052, equal to the sum of a fixed power of the digits. However, "powerful" usually refers to a prime factorization related property, cf. A001694 (and references there as well as on the MathWorld page). C. Rivera has suggested the name "handsome" for these numbers (in view of narcissistic numbers A005188) in his prime puzzle #15: see also contributed comments concerning terminology on that page. - M. F. Hasler, Nov 21 2019

Examples

			43 = 4^2 + 3^3 is OK; 254 = 2^7 + 5^3 + 4^0 is not OK since one of the powers is 0.
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Different from A061862.

Programs

  • Haskell
    a007532 n = a007532_list !! (n-1)
    a007532_list = filter f [1..] where
       f x = g x 0 where
         g 0 v = v == x
         g u v = if d <= 1 then g u' (v + d) else v <= x && h d
                 where h p = p <= x && (g u' (v + p) || h (p * d))
                       (u', d) = divMod u 10
    -- Reinhard Zumkeller, Jun 02 2013
    
  • Maple
    N:= 10000; # to get all entries <= N
    Sums:= proc(L,N)
      option remember;
      local x1,L1;
      x1:= L[1];
      if x1 = 1 then L1:= {1}
      else L1:= {seq(x1^j,j=1..floor(log[x1](N)))};
      fi;
      if nops(L) = 1 then L1
      else select(`<=`,{seq(seq(a+b,a=L1),b=Sums(L[2..-1],N))},N)
      fi
    end proc;
    filter:= proc(x,N)
       local L;
       L:= sort(subs(0=NULL,convert(x,base,10))) ;
       member(x, Sums(L,N));
    end proc;
    A007532:= select(filter,[$1..N],N); # Robert Israel, Apr 13 2014
  • Mathematica
    Select[Range@1000,(s=#;MemberQ[Total/@(a^#&/@Tuples[Range@If[#==1||#==0,1,Floor[Log[#,s]]]&/@(a=IntegerDigits[s])]),s])&] (* Giorgos Kalogeropoulos, Aug 18 2021 *)
  • Python
    from itertools import count, takewhile
    def cands(n, d):
        return takewhile(lambda x: x<=n, (d**i for i in count(1)))
    def handsome(s, t):
        if s == "":
            return t == 0
        if s[0] in "01":
            return handsome(s[1:], t - int(s[0]))
        return any(handsome(s[1:], t - p) for p in cands(t, int(s[0])))
    def ok(n):
        return n and handsome(str(n), n)
    print(list(filter(ok, range(1035)))) # Michael S. Branicky, Aug 18 2021

Formula

If n = d_1 d_2 ... d_k in decimal, then there are integers m_1, m_2, ..., m_k > 0 such that n = d_1^m_1 + ... + d_k^m_k.

A014576 Smallest n-digit narcissistic (or Armstrong) number: smallest n-digit number equal to sum of n-th powers of its digits (or 0 if no such number exists).

Original entry on oeis.org

1, 0, 153, 1634, 54748, 548834, 1741725, 24678050, 146511208, 4679307774, 32164049650, 0, 0, 28116440335967, 0, 4338281769391370, 21897142587612075, 0, 1517841543307505039, 63105425988599693916, 128468643043731391252, 0
Offset: 1

Views

Author

Keywords

References

  • M. Gardner, The Magic Numbers of Dr Matrix. Prometheus, Buffalo, NY, 1985, p. 249.
  • C. A. Pickover, Keys to Infinity. New York: W. H. Freeman, pp. 169-170, 1995.

Crossrefs

Programs

  • Mathematica
    (* This program is not suitable for more than 10 terms *) a[n_] := For[k = 10^(n-1), True, k++, If[k > 10^n - 1, Return[0], If[k == Total[ IntegerDigits[k]^IntegerLength[k] ], Return[k] ] ] ]; Table[ Print[an = a[n]]; an, {n, 1, 10}] (* Jean-François Alcover, Oct 15 2013 *)

Extensions

Terms and links added by Patrick De Geest, Oct 1998
Broken links fixed by M. F. Hasler, Feb 12 2013
Showing 1-10 of 29 results. Next