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

A113018 {Digital root of n} raised to the power {number of digits of n}.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 1, 4, 9, 16, 25, 36, 49, 64, 81, 1, 4, 9, 16, 25, 36, 49, 64, 81, 1, 4, 9, 16, 25, 36, 49, 64, 81, 1, 4, 9, 16, 25, 36, 49, 64, 81, 1, 4, 9, 16, 25, 36, 49, 64, 81, 1, 4, 9, 16, 25, 36, 49, 64, 81, 1, 4, 9, 16, 25, 36, 49, 64, 81, 1
Offset: 0

Views

Author

Alexandre Wajnberg, Jan 03 2006

Keywords

Comments

Fixed points are: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 and 81.

Examples

			a(9) = 9^1 = 9;
a(19) = (1 + 9 = 10 => 1 + 0) = 1^2 =  1;
a(85) = (8 + 5 = 13 => 1 + 3) = 4^2 = 16.
		

Crossrefs

Programs

  • Maple
    A113018 := proc(n) if(n=0)then return 0:fi: return (((n-1) mod 9) + 1)^length(n): end: seq(A113018(n), n=0..100); # Nathaniel Johnston, May 05 2011
  • Mathematica
    Join[{0},Table[ResourceFunction["AdditiveDigitalRoot"][n]^IntegerLength[n],{n,73}]] (* James C. McMahon, Jun 14 2024 *)

Formula

a(n) = A010888(n)^A055642(n). - Michel Marcus, Feb 10 2019

A306853 Positive integers equal to the permanent of the circulant matrix formed by their decimal digits.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 261, 370, 407, 52036, 724212, 223123410
Offset: 1

Views

Author

Paolo P. Lava, Mar 13 2019

Keywords

Comments

1, 2, 3, 4, 5, 6, 7, 8, 9, 370 and 407 are also equal to the determinant of the circulant matrix formed by their decimal digits.

Examples

			     | 2 6 1 |
perm | 1 2 6 | = 2*2*2 + 6*6*6 + 1*1*1 + 1*2*6 + 6*1*2 + 2*6*1 = 261.
     | 6 1 2 |
.
     | 2 2 3 1 2 3 4 1 0 |
     | 0 2 2 3 1 2 3 4 1 |
     | 1 0 2 2 3 1 2 3 4 |
     | 4 1 0 2 2 3 1 2 3 |
perm | 3 4 1 0 2 2 3 1 2 | = 223123410
     | 2 3 4 1 0 2 2 3 1 |
     | 1 2 3 4 1 0 2 2 3 |
     | 3 1 2 3 4 1 0 2 2 |
     | 2 3 1 2 3 4 1 0 2 |
		

Crossrefs

Up to n=110 the permanent of the circulant matrix of the digits of n is equal to A101337 but from n=111 on it can differ.

Programs

  • Maple
    with(linalg): P:=proc(q) local a, b, c, d, i, j, k, n, t;
    for n from 1 to q do d:=ilog10(n)+1; a:=convert(n, base, 10); c:=[];
    for k from 1 to nops(a) do c:=[op(c), a[-k]]; od; t:=[op([]), c];
    for k from 2 to d do b:=[op([]), c[nops(c)]];
    for j from 1 to nops(c)-1 do b:=[op(b), c[j]]; od;
    c:=b; t:=[op(t), c]; od; if n=permanent(t)
    then print(n); fi; od; end: P(10^7);
  • PARI
    mpd(n) = {my(d = digits(n)); matpermanent(matrix(#d, #d, i, j, d[1+lift(Mod(j-i, #d))]));}
    isok(n) = mpd(n) == n; \\ Michel Marcus, Mar 14 2019
    
  • Python
    from sympy import Matrix
    A306853_list = []
    for n in range(1,10**6):
        s = [int(d) for d in str(n)]
        m = len(s)
        if n == Matrix(m, m, lambda i, j: s[(i-j) % m]).per():
            A306853_list.append(n) # Chai Wah Wu, Oct 18 2021

Extensions

a(15) from Vaclav Kotesovec, Aug 19 2021

A357143 a(n) is sum of the base-5 digits of n each raised to the number of digits of n in base 5.

Original entry on oeis.org

1, 2, 3, 4, 1, 2, 5, 10, 17, 4, 5, 8, 13, 20, 9, 10, 13, 18, 25, 16, 17, 20, 25, 32, 1, 2, 9, 28, 65, 2, 3, 10, 29, 66, 9, 10, 17, 36, 73, 28, 29, 36, 55, 92, 65, 66, 73, 92, 129, 8, 9, 16, 35, 72, 9, 10, 17, 36, 73, 16, 17, 24, 43, 80, 35, 36, 43, 62, 99, 72, 73, 80, 99, 136, 27
Offset: 1

Views

Author

Keywords

Examples

			For n = 13_10 = 23_5 (2 digits in base 5): a(13) = 2^2 + 3^2 = 13.
For n = 73_10 = 243_5 (3 digits in base 5): a(73) = 2^3 + 4^3 + 3^3 = 99.
		

Crossrefs

Cf. in base 10: A157714, A101337, A151544.

Programs

  • Maple
    f:= proc(n) local L,d,i;
      L:= convert(n,base,5);
      d:= nops(L);
      add(L[i]^d,i=1..d)
    end proc:
    map(f,[$1..100]); # Robert Israel, Oct 26 2023
  • Mathematica
    a[n_] := Total[IntegerDigits[n, 5]^IntegerLength[n, 5]]; Array[a, 100] (* Amiram Eldar, Oct 30 2022 *)
  • PARI
    a(n) = my(d=digits(n, 5)); sum(k=1, #d, d[k]^#d); \\ Michel Marcus, Oct 29 2022
    
  • Python
    from sympy.ntheory.factor_ import digits
    def A357143(n):
        t = len(s:=digits(n,5)[1:])
        return sum(d**t for d in s) # Chai Wah Wu, Oct 31 2022

Formula

a(n) = Sum_{i=1..A110592(n)} d(i)^A110592(n), where d(i) is the i-th digit of n in base 5.

Extensions

Corrected and extended by Michel Marcus, Oct 29 2022

A113010 {Number of digits of n} raised to the power of {the sum of the digits of n}.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192
Offset: 0

Views

Author

Alexandre Wajnberg, Jan 03 2006

Keywords

Comments

n=1 and 32 are two fixed points. Are there any others?
There are no other fixed points less than 10^1000. - Chai Wah Wu, Feb 28 2019

Crossrefs

Cf. A101337.

Programs

  • Python
    def A113010(n):
        return len(str(n))**sum(int(d) for d in str(n)) # Chai Wah Wu, Feb 28 2019

Formula

a(ijk...) [m digits ijk...] = m^(i+j+k+...)

A308105 Numbers m such that m is greater than the sum of the k-th powers of its digits, where k is the number of digits of m.

Original entry on oeis.org

10, 11, 12, 13, 20, 21, 22, 23, 24, 30, 31, 32, 33, 34, 35, 40, 41, 42, 43, 44, 45, 50, 51, 52, 53, 54, 55, 60, 61, 62, 63, 64, 65, 70, 71, 72, 73, 74, 75, 80, 81, 82, 83, 84, 90, 91, 92, 93, 100, 101, 102, 103, 104, 110, 111, 112, 113, 114, 120, 121, 122, 123, 124, 130, 131, 132, 133, 134
Offset: 1

Views

Author

Bernard Schott, May 13 2019

Keywords

Comments

These integers are called "nombres résistants" on the French site Diophante.
There exists a smallest number M_0 such that every number >= M_0 is a term of this sequence. This integer has 60 digits: M_0 = 102 * 10^57. So 102 * 10^57 - 1 is not "résistant" (proof in the link).

Examples

			34 - (3^2 + 4^2) = 9 so 34 is a term.
126 - (1^3 + 2^3 + 6^3) = -99 and 126 is not a term.
		

Crossrefs

Programs

  • Magma
    sol:=[];v:=[];digit:=[]; m:=1;
    for u in [1..150] do
            digit:=Intseq(u);
                 for i in [1..#digit] do v[i]:=digit[i]^#digit; end for;
                 if u-&+v gt 0 then sol[m]:=u; m:=m+1; end if;
    end for;
    sol; // Marius A. Burtea, May 13 2019
    
  • Maple
    filter:= proc(n) local L,m,t;
      L:= convert(n,base,10);
      m:= nops(L);
      n > add(t^m,t=L)
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Jun 21 2019
  • Mathematica
    Select[Range[140], # - Total[IntegerDigits[#]^IntegerLength[#]] > 0 &] (* Michael De Vlieger, Jun 09 2019 *)
  • PARI
    isok(n) = { my(d=digits(n), nb=#d); n > sum(k=1, #d, d[k]^nb);} \\ Michel Marcus, May 19 2019

Formula

Numbers m such that m - A101337(m) > 0.

A330125 Positive integers whose digit-power sum is a prime.

Original entry on oeis.org

2, 3, 5, 7, 11, 12, 14, 16, 21, 23, 25, 27, 32, 38, 41, 45, 49, 52, 54, 56, 58, 61, 65, 72, 78, 83, 85, 87, 94, 101, 110, 111, 113, 115, 122, 124, 128, 131, 139, 142, 146, 148, 151, 155, 164, 166, 182, 184, 193, 199, 212, 214, 218, 221, 223, 227, 232, 236, 238, 241
Offset: 1

Views

Author

Manan Shah, Dec 01 2019

Keywords

Comments

Let M be an N-digit positive integer with digits (base 10) d_1, d_2, d_3, ..., d_N. If Sum_{i = 1..N} (d_i)^N is prime, then M is part of this sequence.
Numbers k such that A101337(k) is prime.
Both A139749 and A178357 are similar and match the first several terms of this sequence, but the digit powers are different. Additionally, perhaps a more interesting sequence is the subsequence of primes: 2, 3, 5, 7, 11, 23, 41, 61, 83.

Examples

			The first four terms are the single-digit primes; a(5) = 11 since 1^2 + 1^2 = 2, which is prime.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local L,d,t;
       L:= convert(n,base,10);
       d:= nops(L);
       isprime(add(t^d, t=L))
    end proc:
    select(filter, [$1..1000]); # Robert Israel, Oct 17 2023
  • Mathematica
    Select[Range[250], (d = IntegerDigits[#]; PrimeQ@ Total[d^Length[d]]) &] (* Giovanni Resta, Dec 02 2019 *)
  • PARI
    isok(n) = {my(d = digits(n)); isprime(sum(k=1, #d, d[k]^#d));} \\ Michel Marcus, Dec 05 2019

Extensions

More terms from Giovanni Resta, Dec 02 2019

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

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 6, 10, 18, 34, 66, 130, 258, 514, 5, 6, 8, 12, 20, 36, 68, 132, 260, 516, 9, 10, 12, 16, 24, 40, 72, 136, 264, 520, 17, 18, 20, 24, 32, 48, 80, 144, 272, 528, 33, 34, 36, 40, 48, 64, 96, 160, 288, 544, 65, 66, 68, 72, 80, 96
Offset: 1

Views

Author

William Halpin, Apr 26 2022

Keywords

Comments

In base 10, 1 and 4624 are the only numbers where a(n)=n (conjectured).
a(n) < n when n > 2.1*(10^10).

Examples

			a(3) = 1^3 = 1;
a(164) = 3^1 + 3^6 + 3^4 = 813;
a(4624) = 4^4 + 4^6 + 4^2 + 4^4 = 4624.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local m,L,t;
      L:= convert(n,base,10);
      m:= nops(L);
      add(m^t, t=L)
    end proc:
    map(f, [$1..100]);
  • PARI
    a(n) = my(d=digits(n)); vecsum(vector(#d, k, #d^d[k])); \\ Michel Marcus, Apr 27 2022
  • Python
    def a(n): s = str(n); return sum(len(s)**int(d) for d in s)
    print([a(n) for n in range(1, 101)]) # Michael S. Branicky, Apr 26 2022
    

Formula

a(n) = Sum_{k=1..A055642(n)} (A055642(n))^(floor(n*10^(1-k)) mod 10).

A357954 Integers k that are periodic points for some iterations of k->A357143(k).

Original entry on oeis.org

1, 2, 3, 4, 13, 18, 28, 118, 194, 289, 338, 353, 354, 419, 489, 528, 609, 769, 1269, 1299, 2081, 4890, 4891, 9113, 18575, 18702, 20759, 35084, 1874374, 338749352, 2415951874
Offset: 1

Views

Author

Keywords

Comments

Given the function A357143(k), a number k is a term of the sequence if there exists a j such that A357143^j(k) = k, where j is the number of iterations applied.
The sequence is finite.
Proof: A357143(k) < k for all big enough k. g(k) = A110592(k)*4^A110592(k) is clearly an upper bound of A357143(k). Hence k > g(k) -> k > A357143(k), therefore every periodic point must be in an interval [s;t] such that for every k in [s;t] k <= g(k). Limit_{k->oo} g(k)/k = 0; now using the little-o definition we can show that there always exists a certain k_0 such that, for every k > k_0, k > g(k). The conclusion is that there must exist a finite number of intervals [s;t] and, consequently, a finite number of periodic points.
Every term k of the sequence is a periodic point (either a perfect digital invariant or a sociable digital invariant) for the function A357143(k).
The longest cycle needs 6 iterations to end: [489, 609, 769, 1269, 1299, 2081].

Examples

			k=9113 is a fixed point (perfect digital invariant) for the reiterated function A357143(k):
    9113_10 = 242423_5 (a 6-digit number in base 5);
    A357143(9113) = 2^6 + 4^6 + 2^6 + 4^6 + 2^6 + 3^6 = 9113.
k=18702 is a sociable digital invariant for the reiterated function A357143(k), requiring 2 iterations:
  1st iteration:
    18702_10 = 1044302_5 (a 7-digit number in base 5);
    A357143(18702) = 1^7 + 0^7 + 4^7 + 4^7 + 3^7 + 0^7 + 2^7 = 35084;
  2nd iteration:
    35084_10 = 2110314_5 (also a 7-digit number in base 5);
    A357143(35084) = 2^7 + 1^7 + 1^7 + 0^7 + 3^7 + 1^7 + 4^7 = 18702.
		

Crossrefs

Cf. A357143 , A010346 (fixed points), A110592 (exponents p(k)).
Cf. A157714 (base-10 sociable digital invariants), A101337 (A357143(k) base 10), A151544 (base-10 periodic points).

A281724 Numbers k with the property that (sum of digits of k) times (number of digits of k) equals (sum of {each digit of k} raised to the power {number of digits in k}).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 20, 22, 102, 120, 201, 210
Offset: 1

Views

Author

Keywords

Comments

Numbers with the property that q-p = 0, where p = (sum of digits of k) times (number of digits of k) (A110805) and q = (sum of {each digit of k} raised to the power {number of digits in k}) (A101337).
From David Consiglio, Jr., Jan 29 2017: (Start)
The sequence is finite and 210 is the last term. Proof:
1. Let Y = length(k).
2. The maximum value of digit_sum(k) is 9Y.
3. Since p = Y*digit_sum(k), p has a maximum value of 9Y^2.
4. 2^Y > 9Y^2 for all Y > 9. Therefore q > p for all numbers longer than 9 digits that contain any digits > 1.
a. Example: 1,000,000,002. q = 1^5 + 8*0^5 + 2^10 = 1025. The largest p value for a 10-digit number would be for 9,999,999,999 which has p = 10*(9*10) = 900. Since q > all possible p values at this size, any term of this sequence must either have fewer than 10 digits or contain only 0's and 1's as digits.
5. Now we can consider only numbers with 0 and 1 digits.
6. Let Z = number of 1 digits in a number k.
7. q = Z because q = Z*1^Y + (Y-Z)*0^Y = Z.
8. p = YZ because the sum of the digits is equal to the number of 1's.
9. Z = YZ only in the case of Y = 1. Thus, the only term of this sequence that contains only 0's and 1's has a length of only 1 digit. Thus, k = 1 is in this sequence.
10. Therefore a candidate number must have fewer than 10 digits if it contains a digit 2 or larger, and must have fewer than 2 digits if it does not. All numbers in this range have been checked, and no additional values of k with q = p have been found.
Thus the sequence is finite. (End)

Examples

			    9 is a term because             9^1 = 1*(9);
   20 is a term because       2^2 + 0^2 = 2*(2 + 0);
  210 is a term because 2^3 + 1^3 + 0^3 = 3*(2 + 1 + 0).
		

Crossrefs

Programs

  • Mathematica
    W = Array[Total[IntegerDigits[#]^IntegerLength[#]]&, 100]-Table[IntegerLength[n] * Total[IntegerDigits[n]], {n, 100}]; Flatten[Position[W,0]]

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
Previous Showing 11-20 of 20 results.