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

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

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

A101335 Let n = d_1 d_2 ... d_k in base 10 and f(n) = Sum_{i=1..k} d_i^k; sequence gives numbers n such that n != f(n) but n = f(f(n)).

Original entry on oeis.org

136, 244, 2178, 6514, 58618, 76438, 2755907, 6586433, 8139850, 9057586, 277668893, 756738746, 21914086555935085, 37878721692554416, 187864919457180831, 375609204308055082, 13397885590701080090, 40091536165423401387, 108493282045082839040458, 183144838903847612823687
Offset: 1

Views

Author

Allyson A. Wilson (Foxtail(AT)southwind.net), May 04 2005

Keywords

Examples

			136 => 1^3+3^3+6^3=244 => 2^3+4^3+4^3=136.
2178 => 2^4+1^4+7^4+8^4=6514 => 6^4+5^4+1^4+4^4=2178.
		

References

  • Ken Follett, Code to Zero, Dutton, NY 2000, p. 84.

Crossrefs

Cf. A005188.
Subsequence of A157714.

Programs

  • Mathematica
    f[n_] := Plus @@ (IntegerDigits[n]^Floor[Log[10, n] + 1]); Do[ lst = NestList[f, n, 2]; If[lst[[1]] == lst[[3]] != lst[[2]], Print[n]], {n, 110000000}] (* Robert G. Wilson v, May 21 2005 *)

Extensions

a(11)-a(20) from Tim Johannes Ohrtmann, Aug 27 2015

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).
Showing 1-4 of 4 results.