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

A130680 Numbers n such that n = (a_1 + a_2 + ... + a_p)*(a_1^3 + a_2^3 + ... + a_p^3), where n has the decimal expansion a_1a_2...a_p.

Original entry on oeis.org

1, 1215, 3700, 11680, 13608, 87949
Offset: 1

Views

Author

Yalcin Aktar, Jun 29 2007

Keywords

Comments

This sequence is finite and all the terms are listed. Proof: Let a_1a_2...a_p be the decimal expansion of n. Then p <= log_10(n)+1. Furthermore we have a_i <= 9, therefore (a_1 + a_2 + ... + a_p) <= 9*(log_10(n)+1) and (a_1^3 + a_2^3 + ... + a_p^3) <= 9^3*(log_10(n)+1). On the other hand, for all n > 300000 we have 9^4*(log_10(n)+1)^2 < n. A computer search confirms that we indeed have found all terms.

Examples

			87949 = (8+7+9+4+9)*(8^3+7^3+9^3+4^3+9^3).
		

Crossrefs

Cf. A115518.

Programs

  • Mathematica
    For[n = 1, n < 1000000, n++, b = IntegerDigits[n]; If[Sum[b[[i]], {i, 1, Length[b]}] * Sum[b[[i]]^3, {i, 1, Length[b]}] == n, Print[n]]]
    ffQ[n_]:=Module[{c=IntegerDigits[n]},Total[c]Total[c^3]==n]; Select[ Range[ 90000],ffQ] (* Harvey P. Dale, Oct 18 2013 *)

Extensions

Edited by Stefan Steinerberger, Jul 13 2007

A257784 Numbers n such that the sum of the digits squared times the sum of the digits of n to some power equals n.

Original entry on oeis.org

0, 1, 512, 2511, 4913, 5832, 17576, 19683, 24624, 32144, 37000, 111616, 382360, 415000, 420224, 2219400, 14041600, 16328000, 19300032, 30681423, 39203125, 62025728, 78535423, 186836625, 214292000, 432265248, 1120141312, 3479669440, 18529084125, 25342447725
Offset: 1

Views

Author

Pieter Post, May 08 2015

Keywords

Comments

When the power is 1 the numbers are the cubes of their digit sum (A061209).
There are no 2-digit and 18-digit terms. - Chai Wah Wu, Jan 11 2016

Examples

			For power 2: 24624 = (2+4+6+2+4)^2*(2^2+4^2+6^2+2^2+4^2).
For power 3: 111616 = (1+1+1+6+1+6)^2*(1^3+1^3+1^3+6^3+1^3+6^3).
		

Crossrefs

Programs

  • Python
    # WARNING: this prints numbers in the sequence, but not in increasing order.
    def moda(n,a):
        kk = 0
        while n > 0:
            kk= kk+(n%10)**a
            n =int(n//10)
        return kk
    def sod(n):
        kk = 0
        while n > 0:
            kk= kk+(n%10)
            n =int(n//10)
        return kk
    for a in range (1, 10):
        for c in range (1, 10**8):
            if c==sod(c)**2*moda(c,a):
                print(c, end=",")

Extensions

a(16)-a(30) from Giovanni Resta, May 09 2015

A257766 Numbers n such that the sum of the digits of n times the square of the sum of the digits squared of n equals n.

Original entry on oeis.org

1, 2023, 2400, 52215, 615627, 938600, 1648656
Offset: 1

Views

Author

Pieter Post, May 07 2015

Keywords

Comments

Sequence is finite since it cannot contain numbers of 9 or more digits. Indeed a number of 9 digits is at least equal to 10^8, but the function computed here for a number of n digits is at most (9*n)*(9^2*n)^2, which for n=9 is 43046721 < 10^8. - Giovanni Resta, May 08 2015

Examples

			52215 is in the sequence because 52215 = (5+2+2+1+5)*(5^2+2^2+2^2+1^2+5^2)^2.
		

Crossrefs

Cf. A115518.

Programs

  • Mathematica
    Select[Range@1648656,#==Total[IntegerDigits[#]] *Total[IntegerDigits[#]^2]^2&] (* Ivan N. Ianakiev, May 08 2015 *)

A257768 Numbers m such that for some power k, m is the sum of d + d^k as d runs through the digits of m.

Original entry on oeis.org

12, 18, 30, 90, 666, 870, 960, 1998, 7816, 42648, 119394, 302034, 360522, 1741752, 12051036, 909341082, 931186956, 1136424308, 1145082306, 8390370196, 49388550660, 52927388760, 100552730520, 41845367362266, 51671446297908, 245917854035004, 607628544623816, 858683110606660, 4023730658941192
Offset: 1

Views

Author

Pieter Post, May 07 2015

Keywords

Comments

The power k of most terms in this sequence is equal to or one more or one less than the number of digits in the term. One exception is 302034: 302034 = 3^9 + 0^9 + 2^9 + 0^9 + 3^9 + 4^9 + 3+0+2+0+3+4.

Examples

			666 = (6+6+6) + (6^3 + 6^3 + 6^3).
7816 = (7+8+1+6) + (7^4 + 8^4 + 1^4 + 6^4).
360522 = (3+6+0+5+2+2) + (3^7 + 6^7 + 0^7 + 5^7 + 2^7 + 2^7).
		

Crossrefs

Programs

  • Maple
    mmax:= 10:  # to get all terms < 10^mmax
    Res:= NULL:
    score:= (c,p) -> add(c[i+1]*(i+i^p), i=0..9):
    for m from 2 to mmax do
    comps:= convert(map(`-`,combinat:-composition(10+m,10),[1$10]),list):
    for c in comps do
      cL:= [seq(i$c[i+1], i=0..9)];
      if max(c[3..-1]) = 0 then slim:= 0 else slim:= 10^m fi;
      for p from 1 do
        s:= score(c,p);
        L:= sort(convert(s,base,10));
        if L = cL then Res:= Res,s; break fi;
        if s >= slim then break fi;
      od:
    od:
    od:
    sort([Res]); # Robert Israel, May 08 2015
  • Python
    # WARNING: this prints numbers in the sequence, but not in increasing order.
    def moda(n,a):
        kk = 0
        while n > 0:
            kk= kk+(n%10)**a
            n = n//10
        return kk
    def sod(n):
        kk = 0
        while n > 0:
            kk += n % 10
            n = n//10
        return kk
    for a in range (1, 10):
        for c in range (10, 10**6):
            if c == moda(c,a)+sod(c):
                print(c, end=",")

Extensions

a(14)-a(29) from Giovanni Resta, May 08 2015

A366507 Numbers k such that the sum of the digits of k times the square of the sum of the digits cubed of k equals k.

Original entry on oeis.org

1, 4147200, 12743163, 21147075, 39143552, 52921472, 156754936, 205889445, 233935967
Offset: 1

Views

Author

René-Louis Clerc, Oct 11 2023

Keywords

Comments

There are exactly 9 such numbers (Property 13 of Clerc).

Examples

			4147200 = (4+1+4+7+2)*(4^3+1+4^3+7^3+2^3)^2 = 18*230400.
		

Crossrefs

Programs

  • PARI
    niven12()={for(a=0,9,for(b=0,9,for(c=0,9,for(d=0,9,for(e=0,9,for(f=0,9,for(g=0,9,for(h=0,9,for(i=0,9,for(j=0,9,if((a+b+c+d+e+f+g+h+i+j)*(a^3+b^3+c^3+d^3+e^3+f^3+g^3+h^3+i^3+j^3)^2==1000000000*a+100000000*b+10000000*c+1000000*d+100000*e+10000*f+1000*g+100*h+10*i+j,print1(1000000000*a+100000000*b+10000000*c+1000000*d+100000*e+10000*f+1000*g+100*h+10*i+j,";"))))))))))))}
    
  • PARI
    isok(k) = my(d=digits(k)); vecsum(d)*sum(i=1, #d, d[i]^3)^2 == k; \\ Michel Marcus, Oct 12 2023

A366512 Numbers k such that the square of the sum of the digits times the sum of the cubes of the digits equals k.

Original entry on oeis.org

1, 32144, 37000, 111616, 382360
Offset: 1

Views

Author

René-Louis Clerc, Oct 11 2023

Keywords

Comments

There are exactly 5 such numbers (Property 14 of Clerc).

Examples

			32144 = ((3+2+1+4+4)^2)*(3^3 + 2^3 + 1^3 + 4^3 + 4^3) = 196*164.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^6], #1 == Total[#2]^2*Total[#2^3] & @@ {#, IntegerDigits[#]} &] (* Michael De Vlieger, Mar 25 2024 *)
  • PARI
    niven23()={for(a=0,9,for(b=0,9,for(c=0,9,for(d=0,9,for(e=0,9,for(f=0,9,for(g=0,9,for(h=0,9,if((a+b+c+d+e+f+g+h)^2*(a^3+b^3+c^3+d^3+e^3+f^3+g^3+h^3)==10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h,print1(10000000*a+1000000*b+100000*c+10000*d+1000*e+100*f+10*g+h,", "))))))))))}
    
  • PARI
    isok(k) = my(d=digits(k)); vecsum(d)^2*sum(i=1, #d, d[i]^3) == k; \\ Michel Marcus, Oct 12 2023

A257787 Numbers n such that the sum of the digits of n to some power divided by the sum of the digits equal n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 37, 48, 415, 231591, 3829377463694454, 56407086228259246207394322684
Offset: 1

Views

Author

Pieter Post, May 08 2015

Keywords

Comments

The first nine terms are trivial, but then the terms become very rare. It appears that this sequence is finite.

Examples

			37 = (3^3+7^3)/(3+7).
231591 = (2^7+3^7+1^7+5^7+9^7+1^7)/(2+3+1+5+9+1).
		

Crossrefs

Programs

  • Python
    def moda(n,a):
        kk = 0
        while n > 0:
            kk= kk+(n%10)**a
            n =int(n//10)
        return kk
    def sod(n):
        kk = 0
        while n > 0:
            kk= kk+(n%10)
            n =int(n//10)
        return kk
    for a in range (1, 10):
        for c in range (1, 10**6):
            if c*sod(c)==moda(c, a):
                print (a,c, moda(c,a),sod(c))

Extensions

a(14) from Giovanni Resta, May 09 2015
a(15) from Chai Wah Wu, Nov 30 2015

A368939 Numbers k such that the sum of the digits times the sum of the fourth powers of the digits equals k.

Original entry on oeis.org

0, 1, 182380, 444992
Offset: 1

Views

Author

René-Louis Clerc, Jan 10 2024

Keywords

Comments

There are exactly 4 such numbers (Property 16 of Clerc).

Examples

			182380 = (1+8+2+3+8)*(1^4 + 8^4 + 2^4 + 3^4 + 8^4) = 22*8290.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0,10^7],#==Total[IntegerDigits[#]]*Total[IntegerDigits[#]^4]&] (* James C. McMahon, Jan 11 2024 *)
  • PARI
    niven14(k) = my(d=digits(k)); vecsum(d)*sum(i=1, #d, d[i]^4) == k;
    for(k=1,10^7,if(niven14(k)==1,print1(k,", ")))

A257786 Numbers n such that the square root of the sum of the digits times the sum of the digits of n in some power equal n.

Original entry on oeis.org

0, 1, 27, 376, 13131, 234595324075, 54377519037479592374299, 8326623359858152426050700, 1513868951125582592290131113769528
Offset: 1

Views

Author

Pieter Post, May 08 2015

Keywords

Comments

It appears that this sequence is finite.

Examples

			376 = sqrt(3+7+6)*(3^2+7^2+6^2).
13131 = sqrt(1+3+1+3+1)*(1^7+3^7+1^7+3^7+1^7).
		

Crossrefs

Programs

  • Python
    def moda(n,a):
        kk = 0
        while n > 0:
            kk= kk+(n%10)**a
            n =int(n//10)
        return kk
    def sod(n):
        kk = 0
        while n > 0:
            k= kk+(n%10)
            n =int(n//10)
        return kk
    for a in range (1, 10):
        for c in range (1, 10**8):
            if c**2==sod(c)*moda(c,a)**2:
                print (a,c, sod(c),moda(c,a))

Extensions

a(6) from Giovanni Resta, May 09 2015
a(7)-a(9) from Chai Wah Wu, Nov 29 2015

A257969 Numbers m such that the sum of the digits (sod) of m, m^2, m^3, ..., m^9 are in arithmetic progression: sod(m^(k+1)) - sod(m^k) = f for k=1..8.

Original entry on oeis.org

1, 10, 100, 1000, 7972, 10000, 53941, 79720, 100000, 134242, 539410, 698614, 797200, 1000000, 1342420, 5394100, 6986140, 7525615, 7972000, 9000864, 10000000, 10057054, 13424200, 15366307, 17513566, 20602674, 23280211, 24716905, 25274655, 25665559, 32083981, 34326702, 34446204, 34534816
Offset: 1

Views

Author

Pieter Post, May 15 2015

Keywords

Comments

All powers of 10 are terms of this sequence.
If m is a term, then so is 10*m.
Number of terms < 10^k for k >= 1: 1, 2, 3, 5, 8, 13, 20, 62.

Examples

			7972 is in the sequence, because the difference between the successive sum-of-digit values is 15:
  sod(7972) = 25;
  sod(7972^2) = 40;
  sod(7972^3) = 55;
  sod(7972^4) = 70;
  sod(7972^5) = 85;
  sod(7972^6) = 100;
  sod(7972^7) = 115;
  sod(7972^8) = 130;
  sod(7972^9) = 145;
  sod(7972^10) = 178, where the increment is no longer 15.
But there are seven numbers below 10^9 with a longer sequence (namely, 134242, 23280211, 40809168, 46485637, 59716223, 66413917, and 97134912) where sod(m^(k+1)) - sod(m^k) = f for k=1..9.
  sod(134242) = 16;
  sod(134242^2) = 40;
  sod(134242^3) = 64;
  sod(134242^4) = 88;
  sod(134242^5) = 112;
  sod(134242^6) = 136;
  sod(134242^7) = 160;
  sod(134242^8) = 184;
  sod(134242^9) = 208;
  sod(134242^10) = 232;
  sod(134242^11) = 283, where the increment is no longer 24.
		

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{g}, g[x_] := Power[x, #] & /@ Range@ 9; Length@ DeleteDuplicates@ Differences[Total[IntegerDigits@ #] & /@ g@ n] == 1]; Select[Range@ 1000000, fQ] (* Michael De Vlieger, Jun 12 2015 *)
    Select[Range[35*10^6],Length[Union[Differences[Total/@IntegerDigits[ #^Range[9]]]]] ==1&] (* Harvey P. Dale, Aug 23 2017 *)
  • PARI
    isok(n) = {my(osod = sumdigits(n^2)); my(f = osod - sumdigits(n)); for (k=3, 9, my(nsod = sumdigits(n^k)); if (nsod - osod != f, return (0)); osod = nsod;); return (1);} \\ Michel Marcus, May 28 2015

Formula

{m : sod(m^(k+1)) - sod(m^k) = f for k=1..8}.

Extensions

Corrected and extended by Harvey P. Dale, Aug 23 2017
Edited by Jon E. Schoenfield, Mar 01 2022
Showing 1-10 of 11 results. Next