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

A329291 Ratio A101337(m)/m for m = A306360(n), numbers dividing the value of their narcissistic function.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 7, 2, 1, 1, 1, 5, 4, 4, 1, 1, 3, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 3, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 3, 2, 1, 4, 1, 1, 1, 4, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

M. F. Hasler, Nov 17 2019

Keywords

Comments

A101337 (sum of digits raised to power A055642(n) = #digits(n)) is sometimes called the narcissistic function for base 10.
This sequence has the same finite number of elements as A306360.

Crossrefs

Cf. A101337, A306360, A329292 (least index i with a(i) = n = 1, 2, 3...).

Programs

Formula

a(n) = A101337(A306360(n))/A306360(n).

Extensions

a(108)-a(109) from Giovanni Resta, Nov 18 2019

A101337 Sum of (each digit of n raised to the power (number of digits in n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 5, 10, 17, 26, 37, 50, 65, 82, 4, 5, 8, 13, 20, 29, 40, 53, 68, 85, 9, 10, 13, 18, 25, 34, 45, 58, 73, 90, 16, 17, 20, 25, 32, 41, 52, 65, 80, 97, 25, 26, 29, 34, 41, 50, 61, 74, 89, 106, 36, 37, 40, 45, 52, 61, 72, 85, 100, 117, 49, 50, 53, 58, 65
Offset: 1

Views

Author

Gordon Hamilton, Dec 24 2004

Keywords

Comments

Sometimes referred to as "narcissistic function" (in base 10). Fixed points are the narcissistic (or Armstrong, or plus perfect) numbers A005188. - M. F. Hasler, Nov 17 2019

Examples

			a(75) = 7^2 + 5^2 = 74 and a(705) = 7^3 + 0^3 + 5^3 = 468.
a(1.02e59 - 1) = 102429587095122578993551250282047487264694110769657513064859 ~ 1.024e59 is an example of n close to the limit beyond which a(n) < n for all n. - _M. F. Hasler_, Nov 17 2019
		

Crossrefs

Programs

  • Magma
    f:=func; [f(n):n in [1..75]]; // Marius A. Burtea, Nov 18 2019
  • Mathematica
    Array[Total[IntegerDigits[#]^IntegerLength[#]]&,80] (* Harvey P. Dale, Aug 27 2011 *)
  • PARI
    a(n)=my(d=digits(n)); sum(i=1,#d, d[i]^#d) \\ Charles R Greathouse IV, Aug 10 2017
    
  • PARI
    apply( A101337(n)=vecsum([d^#n|d<-n=digits(n)]), [0..99]) \\ M. F. Hasler, Nov 17 2019
    
  • Python
    def A101337(n):
        s = str(n)
        l = len(s)
        return sum(int(d)**l for d in s) # Chai Wah Wu, Feb 26 2019
    

Formula

a(n) <= A055642(n)*9^A055642(n) with equality for all n = 10^k - 1. Write n = 10^x to get a(n) < n when 1+log_10(x+1) < (x+1)(1-log_10(9)) <=> x > 59.85. It appears that a(n) < n already for all n > 1.02*10^59. - M. F. Hasler, Nov 17 2019

Extensions

Name changed by Axel Harvey, Dec 26 2011
Edited by M. F. Hasler, Nov 17 2019

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

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

A329292 Least number m > 0 such that A101337(m)/m = n, or 0 if no such m exists.

Original entry on oeis.org

1, 459, 3194922, 174961, 119564, 0, 13598
Offset: 1

Views

Author

M. F. Hasler, Nov 17 2019

Keywords

Comments

Subsequence of A306360, therefore also finite.

Crossrefs

Programs

Formula

a(n) = min { m in A306360 | A101337(m)/m = n }.

Extensions

a(6)-a(7) from Chai Wah Wu, Nov 18 2019 using b-file of A306360

A329659 Largest number m > 0 such that A101337(m)/m = n, or 0 if no such m exists.

Original entry on oeis.org

115132219018763992565095597973971522401, 13384899942524140745922870, 18935132531699388, 2098649524599800996, 119564, 0, 13598
Offset: 1

Views

Author

Chai Wah Wu, Nov 18 2019

Keywords

Crossrefs

A334601 Positive integers m such that sum of cubes of the digits of m, t=A055012(m), is a multiple of m (m/A055012(m) is an integer >= 1).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 24, 27, 37, 48, 153, 370, 371, 407, 459
Offset: 1

Views

Author

Zak Seidov, May 07 2020 and May 12 2020

Keywords

Comments

Corresponding values of t: 1, 8, 27, 64, 125, 216, 343, 512, 729, 72, 351, 370, 576, 153, 370, 371, 407, 918 (first 9 terms are all cubes).
Corresponding values of t/m: 1, 4, 9, 16, 25, 36, 49, 64, 81, 3, 13, 10, 12, 1, 1, 1, 1, 2 (first 9 terms are all squares).
The subsequence of numbers m such that sum of cubes of its digits is equal to m is A046197 \ {0}. - Bernard Schott, May 11 2020

Examples

			m = 459, t = 4^3 + 5^3 + 9^3 = 918, t/m = 2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[500], Divisible[Plus @@ (IntegerDigits[#]^3), #] &] (* Amiram Eldar, May 11 2020 *)
  • PARI
    isok(m) = my(d=digits(m)); sum(k=1, #d, d[k]^3) % m == 0; \\ Michel Marcus, May 14 2020
Showing 1-7 of 7 results.