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

A258484 Numbers m such that m equals a fixed number raised to the powers of the digits.

Original entry on oeis.org

1, 10, 12, 100, 101, 111, 1000, 1010, 1033, 1100, 2112, 4624, 10000, 10001, 11101, 20102, 31301, 100000, 100010, 100011, 100100, 100101, 100110, 101000, 101001, 101010, 101100, 101110, 101111, 101121, 110000, 110001, 110010, 110100, 110110, 110111, 111000
Offset: 1

Views

Author

Pieter Post, May 31 2015

Keywords

Comments

Let m = abcde... and z is a fixed radix -> m = z^a +z^b +z^c +z^d +z^e...
A number m made of k ones and h zeros is a member if m-h is divisible by k. Several other large members exist, including 12095925296900865188 (base = 113) and 115330163577499130079377256005 (base = 1500). - Giovanni Resta, Jun 01 2015

Examples

			12 = 3^1 + 3^2;
31301 = 25^3 + 25^1 + 25^3 + 25^0 + 25^1;
595968 = 4^5 + 4^9 + 4^5 + 4^9 + 4^6 + 4^8;
13177388 = 7^1 + 7^3 + 7^1 + 7^7 + 7^7 + 7^3 + 7^8 + 7^8.
		

Crossrefs

Programs

  • Mathematica
    okQ[v_] := Block[{b, d=IntegerDigits@ v, y, t}, t = Last@ Tally@ Sort@d; b = Floor[ (v/t[[2]]) ^ (1/t[[1]])]; While[(y = Total[b^d]) > v, b--]; v==y]; Select[Range[10^5],okQ] (* Giovanni Resta, Jun 01 2015 *)
  • PARI
    for(n=1,10^5,d=digits(n);for(m=1,n,s=sum(i=1,#d,m^d[i]);if(s==n,print1(n,", ");break);if(s>n,break))) \\ Derek Orr, Jun 12 2015
  • Python
    def moda(n,a,m):
        kk = 0
        while n > 0:
            na=int(n%m)
            kk= kk+a**na
            n =int(n//m)
        return kk
    for c in range (1, 10**8):
        for a in range (1,20):
            if  c==moda(c,a,10):
                print (a,c)
    

Extensions

More terms from Giovanni Resta, Jun 01 2015

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

A257860 Numbers n such that a digit of n to the power k plus the sum of the other digits of n equals n, where k is a positive integer.

Original entry on oeis.org

1, 89, 132, 264, 518, 739, 2407, 6579, 8200, 8201, 8202, 8203, 8204, 8205, 8206, 8207, 8208, 8209, 32780, 32781, 32782, 32783, 32784, 32785, 32786, 32787, 32788, 32789, 59060, 59061, 59062, 59063, 59064, 59065, 59066, 59067, 59068, 59069, 78145, 524300, 524301, 524302, 524303, 524304, 524305, 524306, 524307, 524308, 524309, 531459, 823567, 2097178
Offset: 1

Views

Author

Pieter Post, May 11 2015

Keywords

Comments

There are numbers that come in groups of 10, like 8200, 32780 and 524300. But there are also a few stand-alone numbers. Like 531459 (=5+3+1+4+5+9^6).
It is easy to generate large terms in the sequence, for example, 9^104+409 and 9^1047+4561 are the smallest terms with 100 and 1000 digits, respectively. - Giovanni Resta, May 12 2015

Examples

			89 is in the sequence because 89 = 8+9^2.
2407 is in the sequence because 2407 = 2+4+0+7^4.
8202 is in the sequence because 8202 = 8+ 2^13 +0+2, also 8202 = 8+2+0+2^13.
		

Crossrefs

Programs

  • Haskell
    import Data.List (nub); import Data.List.Ordered (member)
    a257860 n = a257860_list !! (n-1)
    a257860_list = 1 : filter f [1..] where
       f x = any (\d -> member (x - q + d) $ ps d) $ filter (> 1) $ nub ds
             where q = sum ds; ds = (map (read . return) . show) x
       ps x = iterate (* x) (x ^ 2)
    -- Reinhard Zumkeller, May 12 2015
  • Python
    def sod(n):
        kk = 0
        while n > 0:
            kk= kk+(n%10)
            n =int(n//10)
        return kk
    for i in range (1,10**7):
        for j in range(1,len(str(i))+1):
            k=(i//(10**(j-1)))%10
            for m in range (2,30):
                if i==sod(i)+k**m-k:
                    print (i)
    

Extensions

One more term and some missing data added by Reinhard Zumkeller, May 12 2015

A334249 Numbers k such that (k - digitsum(k))(k + digitsum(k)) contains k as a substring.

Original entry on oeis.org

11, 88, 101, 448, 673, 776, 1001, 2879, 3553, 9537, 10001, 14651, 36559, 49056, 51073, 54116, 59600, 100001, 505025, 998999, 1000001, 4115964, 5050250, 5133355, 10000001, 10050125, 19349727, 26550976, 33726078, 35792647, 42349456, 43605459, 50050025, 66952741, 88027284, 88819024, 100000001, 105124922
Offset: 1

Views

Author

Scott R. Shannon, May 05 2020

Keywords

Comments

All numbers of the form 10^n + 1 (for n > 0) are in the sequence.

Examples

			11 is a term as digitsum(11) = 2 and (11 - 2)(11 + 2) = 117, which contains '11' as a substring.
9537 is a term as digitsum(9537) = 24 and (9537 - 24)(9537 + 24) = 90953793, which contains '9537' as a substring.
		

Crossrefs

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

A270542 Numbers of the form (pq)^2, where p is the number of digits of n (A055642) and q is the sum of the digits of n (A007953).

Original entry on oeis.org

0, 1, 2704, 5184, 7744
Offset: 1

Views

Author

Keywords

Examples

			2704 is a term because 2704 = [4*(2+7+0+4)]^2;
5184 is a term because 5184 = [4*(5+1+8+4)]^2.
		

Crossrefs

Programs

  • Mathematica
    Position[ Table[ IntegerLength[k] Sum[( Floor[k/10^n] - 10 Floor[k/10^(n + 1)]), {n, 0, IntegerLength@ k^2}] - k, {k, 1, 10^6}], 0] // Flatten = {1, 1232, 4100, 268542}
    Select[Range[10^3]^2,With[{id=IntegerDigits[#]},#==(Length[id]*Plus@@id)^2]&] (* Ray Chandler, Apr 01 2016 *)
  • PARI
    isok(n) = d = digits(n); (#d*vecsum(d))^2 == n; \\ Michel Marcus, Mar 26 2016
Showing 1-6 of 6 results.