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.

Previous Showing 51-60 of 93 results. Next

A061862 Powerful numbers (2a): a sum of nonnegative powers of its digits.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 43, 63, 89, 132, 135, 153, 175, 209, 224, 226, 254, 258, 262, 263, 264, 267, 283, 332, 333, 334, 347, 357, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 407, 445, 463, 472, 518, 538, 598, 629, 635, 653, 675, 730, 731, 732
Offset: 1

Views

Author

Erich Friedman, Jun 23 2001

Keywords

Comments

Zero digits cannot be used in the sum. - N. J. A. Sloane, Aug 31 2009
More precisely, digits 0 do not contribute to the sum, in contrast to A134703 where it is allowed to use 0^0 = 1. - M. F. Hasler, Nov 21 2019

Examples

			43 = 4^2 + 3^3; 254 = 2^7 + 5^3 + 4^0 = 128 + 125 + 1.
209 = 2^7 + 9^2.
732 = 7^0 + 3^6 + 2^1.
		

Crossrefs

Different from A007532 and A134703, which are variations.

Programs

  • Haskell
    a061862 n = a061862_list !! (n-1)
    a061862_list = filter f [0..] 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 1
                 where h p = p <= x && (g u' (v + p) || h (p * d))
                       (u', d) = divMod u 10
    -- Reinhard Zumkeller, Jun 02 2013
  • Mathematica
    f[ n_ ] := Module[ {}, a=IntegerDigits[ n ]; e=g[ Length[ a ] ]; MemberQ[ Map[ Apply[ Plus, a^# ] &, e ], n ] ] g[ n_ ] := Map[ Take[ Table[ 0, {n} ]~Join~#, -n ] &, IntegerDigits[ Range[ 10^n ], 10 ] ] For[ n=0, n >= 0, n++, If[ f[ n ], Print[ n ] ] ]

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.

A114135 Primitive numbers n such that the sums of the digits of n, n^2 and n^3 coincide (cf. A111434).

Original entry on oeis.org

1, 468, 585, 5851, 5868, 28845, 58968, 21688965, 29588877, 37848897, 49879981, 58577797, 79898994, 79958368, 79979698, 89757468, 109699677, 159699969, 468957888, 479597652, 479896587, 480749985, 494899398, 497349981, 498678256
Offset: 1

Views

Author

Keywords

Comments

Members of A111434 not congruent to 0 (mod 10). If k is a member of A111434 then so is 10^e*k.
The authors have calculated all members below 10^11.
The number of members less than 10^n {n=0..11}: 0,1,1,3,5,7,7,7,16,34,57,125.
Number of members congruent to k (mod 10): 0,7,1,0,2,23,8,20,49,15. But more interesting, number of members are congruent to k (mod 9): 66,59,0,0,0,0,0,0,0.
A007953(n) == n mod 9. Since 0 and 1 are the only k in [0,1,...8] with k == k^2 mod 9, all terms are congruent to 0 or 1 mod 9. - Robert Israel, Jan 26 2015

Crossrefs

Programs

  • Mathematica
    sod[n_] := Plus @@ IntegerDigits@n; lst = {}; Do[ If[(Mod[n, 9] == 0 || Mod[n, 9] == 1) && Mod[n, 10] != 0 && sod@n == sod[n2] == sod[n3], AppendTo[lst, n]], {n, 108/2}]; lst
    Select[Range[5*10^8],Length[Union[Total/@IntegerDigits/@{#,#^2,#^3}]]==1 && Mod[#,10]!=0&] (* Harvey P. Dale, Jul 07 2020 *)
  • PARI
    isok(n) = (n % 10) && ((sd=sumdigits(n)) == sumdigits(n^2)) && (sd == sumdigits(n^3)); \\ Michel Marcus, Jan 20 2015

A151543 Smallest precursor of n-th cycle in the "Recurring Digital Invariant Variant" problem.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 14, 59, 108, 119, 136, 138, 147, 177, 389, 407, 559, 709, 999, 1118, 1157, 1346, 4479, 11227, 12399, 22779, 30489, 100666, 127779, 577999, 677779, 1000259, 1001458, 1007889, 1035889, 1124577, 1188888
Offset: 1

Views

Author

N. J. A. Sloane, May 15 2009 based on email from Eric Angelini, Feb 18 2009

Keywords

Comments

The problem is the following:
a) choose a number N
b) let k be the number of digits in N
c) raise each digit of N to the k-th power and add the results
d) call the new number N and repeat
Example:
a) 14 = N
b) k = 2
c) 1^2 + 4^2 = 17
d) 17 = N
e) k = 2
f) 1^2 + 7^2 = 50
g) 50 = N
... etc.
Here is the trajectory of 14:
14 -> 1^2 + 4^2 = 17
17 -> 1^2 + 7^2 = 50
50 -> 5^2 + 0^2 = 25
25 -> 2^2 + 5^2 = 29
29 -> 2^2 + 9^2 = 85
85 -> 8^2 + 5^2 = 89
89 -> 8^2 + 9^2 = 145
145 -> 1^3 + 4^3 + 5^3 = 190
190 -> 1^3 + 9^3 + 0^3 = 730
730 -> 7^3 + 3^3 + 0^3 = 370
370 -> 3^3 + 7^3 + 0^3 = 370 (fixed point)
The question is, what are the cycles that appear in the trajectories?
The following table of the first 34 cycles (arranged in order of the smallest precursor) was calculated by Hans Havermann:
The format for each cycle is:
Index {the smallest precursor (the current sequence), the cycle length, {the cycle itself with the smallest element of the cycle first - see A151544}}:
1 { 1, 1, {1}}
2 { 2, 1, {2}}
3 { 3, 1, {3}}
4 { 4, 1, {4}}
5 { 5, 1, {5}}
6 { 6, 1, {6}}
7 { 7, 1, {7}}
8 { 8, 1, {8}}
9 { 9, 1, {9}}
10 { 14, 1, {370}}
11 { 59, 3, {160, 217, 352}}
12 { 108, 1, {153}}
13 { 119, 1, {371}}
14 { 136, 2, {136, 244}}
15 { 138, 10, {259, 862, 736, 586, 853, 664, 496, 1009, 6562, 3233}}
16 { 147, 14, {18829, 124618, 312962, 578955, 958109, 1340652, 376761, 329340, 537059, 681069, 886898, 1626673, 1665667, 2021413}}
17 { 177, 2, {58618, 76438}}
18 { 389, 6, {2929, 13154, 4394, 7154, 3283, 4274}}
19 { 407, 1, {407}}
20 { 559, 3, {282595, 824963, 845130}}
21 { 709, 1, {8208}}
22 { 999, 2, {2178, 6514}}
23 { 1118, 4, {10933, 59536, 73318, 50062}}
24 { 1157, 12, {5908997, 17347727, 23131558, 17571846, 30442597, 49340036, 44870531, 23070276, 13216291, 44733413, 5981093, 11743403}}
25 { 1346, 1, {1634}}
26 { 4479, 1, {9474}}
27 { 11227, 1, {54748}}
28 { 12399, 1, {32164049651}}
29 { 22779, 1, {92727}}
30 { 30489, 1, {93084}}
31 {100666, 12, {1680387, 5299971, 15250704, 6611844, 2689794, 12783081, 39326052, 45130596, 45579685, 68505765, 27073124, 11602212}}
32 {127779, 1, {548834}}
33 {577999, 1, {4210818}}
34 {677779, 3, {2767918, 8807272, 5841646}}
35 {1000259, 1, {9926315}}
36 {1001458, 6, {2191663, 5345158, 2350099, 9646378, 8282107, 5018104}}
37 {1007889, 1, {9800817}}
38 {1035889, 2, {8139850, 9057586}}
39 {1124577, 1, {1741725}}
40 {1188888, 1, {24678051}}
41 {2055779, 2, {2755907, 6586433}}
42 {2566699, 1, {472335975}}
43 {4888888, 10, {180450907, 564207094, 440329717, 468672187, 369560719, 837322786, 359260756, 451855933, 527799103, 857521513}}
44 {10135679, 1, {24678050}}
45 {10146899, 1, {146511208}}
46 {10233389, 1, {88593477}}
47 {10266888, 7, {1139785743, 5136409024, 3559173428, 4863700423, 1418899523, 9131926726, 7377037502}}
48 {14489999, 3, {180975193, 951385123, 525584347}}
49 {14788889, 1, {912985153}}
50 {20248999, 1, {534494836}}
51 {155999999, 2, {277668893, 756738746}}
Any number < 10^9 will fall into one of these 51 cycles.
The name "Recurring Digital Invariant Variant" was suggested by Mensanator on the rec.puzzles web site.

Crossrefs

A306354 a(n) = gcd(n, A101337(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 2, 1, 4, 1, 2, 1, 4, 1, 3, 1, 1, 3, 1, 1, 9, 1, 1, 3, 8, 1, 2, 1, 4, 1, 2, 1, 16, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 1, 12, 1, 2, 9, 4, 1, 6, 1, 4, 3, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 16, 1, 2, 1, 4, 1, 2, 1, 8, 1, 9
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 09 2019

Keywords

Comments

A101337(n) / n = r, r an integer, gives A306360. A101337(n) / n = 1 gives A005188. n / A101337(n) = s, s an integer, gives A306361. The motivation for this sequence was the question as to which numbers n have the property A101337(n) / n = r and the property n / A101337(n) = s?

Examples

			For n = 24, a(24) = gcd(24, 2*2 + 4*4) = gcd(24,20) = 4, thus a(24) = 4;
for n = 153, a(153) = gcd(153, 1*1*1 + 5*5*5 + 3*3*3) = gcd(153,153) = 153, thus a(153) = 153.
		

Crossrefs

Programs

  • Mathematica
    Array[GCD[#1, Total[#2^Length[#2]]] & @@ {#, IntegerDigits@ #} &, 90] (* Michael De Vlieger, Feb 09 2019 *)
  • PARI
    a(n) = my(d=digits(n)); gcd(n, sum(i=1, #d, d[i]^#d)); \\ Michel Marcus, Feb 12 2019
    
  • Python
    from math import gcd
    def A306354(n): return gcd(n,sum(int(d)**len(str(n)) for d in str(n))) # Chai Wah Wu, Jan 26 2022

A016087 First nontrivial or multidigital Armstrong number to base n.

Original entry on oeis.org

5, 28, 13, 99, 10, 20, 41, 153, 61, 29, 17, 244, 113, 342, 40, 80, 181, 2413, 26, 97, 53, 11080, 313, 5425, 90, 180, 421, 68, 37, 205, 109, 356, 613, 5489, 160, 85, 761, 10413, 261, 353, 50, 637, 1013, 292, 104, 500, 1201, 1025, 1301, 541, 281, 127295, 178
Offset: 3

Views

Author

Keywords

Comments

Also called narcissistic numbers or pluperfect digital invariants.
a(90) > 10^8 if it exists at all. - Robert Israel, Aug 24 2015

Crossrefs

Programs

  • Maple
    f:= proc(n) local k,L,m;
      for k from n+1 do
        L:= convert(k,base,n);
        m:= nops(L);
        if add(t^m,t=L) = k then return(k) fi
      od
    end proc:
    map(f, [$3..89]); # Robert Israel, Aug 24 2015
  • Mathematica
    Do[k = n + 1; While[l = IntegerDigits[k, n]; Apply[Plus, l^Length[l]] != k, k++]; Print[k], {n, 3, 75}]

Extensions

Edited and extended by Robert G. Wilson v, Feb 28 2002

A229381 The Simpsons's perfect number, Mersenne prime, and narcissistic number.

Original entry on oeis.org

8128, 8191, 8208
Offset: 1

Views

Author

Joe Sondow and Jonathan Sondow, Sep 23 2013

Keywords

Comments

The perfect number 8128, Mersenne prime 8191, and narcissistic number 8208 appeared together on the screen in the "Marge and Homer Turn a Couple Play" episode of Season 17 of The Simpsons.

References

  • S. Singh, The Simpsons and Their Mathematical Secrets, Bloomsbury Publishing, London, 2013, pp. 93-96, ISBN 9781408835302 / 9781408843734.

Crossrefs

Formula

a(1) = A000396(4), a(2) = A000668(5), a(3) = A005188(15).

A306361 Numbers k divisible by A101337(k) (narcissistic function).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 20, 50, 100, 110, 111, 153, 200, 221, 370, 371, 407, 500, 702, 1000, 1010, 1011, 1020, 1100, 1101, 1110, 1121, 1122, 1634, 2000, 2322, 4104, 5000, 8208, 9474, 10000, 10010, 10011, 10100, 10101, 10110, 11000, 11001, 11010, 11022, 11100, 11122, 11220, 12012, 12110, 12210, 12320, 14550
Offset: 1

Views

Author

Ctibor O. Zizka, Feb 10 2019

Keywords

Comments

A005188 is a subsequence of this sequence.
Numbers in A007088 with either 3 or 9 ones are terms of this sequence. - Chai Wah Wu, Feb 26 2019
For all N in A007088 we have A101337(N) = A007953(N) = number of digits '1'; whenever this equals 2^k*5^m (k, m >= 0) and N ends in max(k,m) '0's, then N is also in this sequence. - M. F. Hasler, Nov 18 2019

Examples

			For k = 20, 20 / (2^2 + 0^2) = 5;
for k = 221, 221 / (2^3 + 2^3 + 1^3) = 13.
		

Crossrefs

Programs

A243025 Fixed points of the transform n = d_(k)*10^(k-1) + d_(k-1)*10^(k-2) + ... + d_(2)*10 + d_(1) -> Sum_{i=1..k-1}{d_(i)^d(i+1)}+d(k)^d(1) (A243023).

Original entry on oeis.org

1, 4155, 4355, 1953504, 1954329, 522169982
Offset: 1

Views

Author

Paolo P. Lava, May 29 2014

Keywords

Comments

Subset of A243023.
This sequence is finite by using the same argument that Armstrong numbers (A005188) are finite. - Robert G. Wilson v, Jun 01 2014

Examples

			1^1 = 1.
5^5 + 5^1 + 1^4 + 4^5 = 4155.
5^5 + 5^3 + 3^4 + 4^5 = 4355.
4^0 + 0^5 + 5^3 + 3^5 + 5^9 + 9^1 + 1^4 = 1953504.
9^2 + 2^3 + 3^4 + 4^5 + 5^9 + 9^1 + 1^9 = 1954329.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q) local a,b,k,ok,n; for n from 10 to q do a:=[]; b:=n;
    while b>0 do a:=[op(a),b mod 10]; b:=trunc(b/10); od; b:=0; ok:=1; for k from 2 to nops(a)
    do if a[k-1]=0 and a[k]=0 then ok:=0; break; else b:=b+a[k-1]^a[k]; fi; od;
    if ok=1 then if n=(b+a[nops(a)]^a[nops(1)]) then print(n);
    fi; fi; od; end: P(10^10);
  • Mathematica
    fQ[n_] := Block[{r = Reverse@ IntegerDigits@ n}, n == Plus @@ (r^RotateLeft@ r)]; k = 1; lst = {}; While[k < 1000000001, If[ fQ@ k, AppendTo[ lst, k]; Print@ k]; k++] (* Robert G. Wilson v, Jun 01 2014 *)

Extensions

Added a(1) as 1 and a(6) by Robert G. Wilson v, Jun 01 2014

A257814 Numbers n such that k times the sum of the digits (d) to the power k equal n, so n=k*sum(d^k), for some positive integer k, where k is smaller than sum(d^k).

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 50, 298, 130004, 484950, 3242940, 4264064, 5560625, 36550290, 47746195, 111971979, 129833998, 9865843497, 46793077740, 767609367921, 4432743262896, 42744572298532, 77186414790914, 99320211963544, 99335229415136, 456385296642870
Offset: 1

Views

Author

Pieter Post, May 10 2015

Keywords

Comments

The first nine terms are trivial, but then the terms become scarce. The exponent k must be less than the "sum of the digits" raised to the k-th power, otherwise there will be infinitely many terms containing 1's and 0's, like 11000= 5500*(1^5500+1^5500+0^5500+0^5500+0^5500). It appears this sequence is finite, because there is a resemblance with the Armstrong numbers (A005188).

Examples

			50 = 2*(5^2+0^2);
484950 = 5*(4^5+8^5+4^5+9^5+5^5+0^5).
		

Crossrefs

Programs

  • PARI
    sdk(d, k) = sum(j=1, #d, d[j]^k);
    isok(n) = {d = digits(n); k = 1; while ((val=k*sdk(d,k)) != n, k++; if (val > n, return (0))); k < sdk(d,k);} \\ Michel Marcus, May 30 2015
  • Python
    def mod(n,a):
        kk = 0
        while n > 0:
            kk= kk+(n%10)**a
            n =int(n//10)
        return kk
    for a in range (1, 10):
        for c in range (1, 10**7):
            if c==a*mod(c,a) and a
    				

Extensions

a(16)-a(28) from Giovanni Resta, May 10 2015

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
Previous Showing 51-60 of 93 results. Next