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

A152077 Length of the trajectory of the map x->A003132(x) started at x=n^2 up to the end of its first period.

Original entry on oeis.org

1, 8, 12, 8, 11, 16, 5, 12, 11, 2, 18, 13, 17, 17, 13, 11, 11, 11, 13, 9, 13, 14, 11, 11, 11, 19, 12, 5, 12, 12, 17, 14, 15, 17, 13, 14, 17, 6, 4, 9, 14, 14, 16, 17, 13, 9, 9, 11, 14, 11, 15, 14, 11, 14, 11, 14, 11, 7, 13, 16, 17, 12, 15, 7, 6, 4, 18, 15, 14, 5, 9, 10, 12, 16, 13, 15, 12, 12
Offset: 1

Views

Author

R. J. Mathar, Sep 16 2009

Keywords

Comments

This accumulates the length of the "transient" or "pre-periodic" part of the trajectory started at n^2 plus the length of the first period.

Examples

			a(5)=11 since the trajectory starting at x=5^2 is 25, 29, 85, 89, 145, 42, 20, 4, 16, 37, 58 the next term 89 is already there.
a(10)= 2 since the trajectory starting at x=10^2 is 100,1 and the next term is again the 1.
a(11)= 18 because the trajectory is 121, 6, 36, 45, 41, 17, 50, 25, 29, 85, 89, 145, 42, 20, 4, 16, 37, 58, the next 89 is already there.
		

Crossrefs

Formula

a(n) = A099645(n^2)+A031176(n^2) .

A182111 Number of iterations of the map n -> sum of the cubes of the decimal digits of n.

Original entry on oeis.org

1, 7, 3, 6, 6, 10, 6, 6, 4, 1, 8, 5, 5, 6, 10, 3, 8, 2, 2, 7, 5, 4, 7, 3, 3, 8, 2, 4, 3, 3, 5, 7, 6, 3, 6, 6, 1, 8, 6, 6, 6, 3, 3, 7, 5, 5, 1, 6, 4, 6, 10, 3, 6, 5, 3, 5, 5, 8, 10, 10, 3, 8, 6, 5, 5, 6, 7, 11, 6, 6, 8, 2, 1, 1, 5, 7, 7, 8, 4, 6, 2, 4, 8, 6, 8
Offset: 1

Views

Author

Michel Lagneau, Apr 12 2012

Keywords

Comments

a(n) is the number of times you obtain the sums of cubes of digits of n before reaching a fixed point (last number of the cycle).

Examples

			a(3) = 3 because :
3^3  = 27 -> 2^3 + 7^3 = 351;
351 -> 3^3 + 5^3 + 1^3 = 153;
153 -> 1^3+5^3+3^3 = 153 is the end because this number is already in the trajectory. Hence we obtain the map : 3 -> 27 -> 351 -> 153 with 3 iterations.
		

Crossrefs

Programs

  • Maple
    a:= proc(n) local k, m, s; m:= n; s:= {};
          for k from 0 do
            m:= add(i^3, i=convert(m, base, 10));
            if m in s then return k fi;
            s:= s union {m}
          od
        end:
    seq(a(n), n=1..85);  # Alois P. Heinz, Mar 01 2018

A182160 Number of iterations of the map n -> sum of the n-powers of the decimal digits of n.

Original entry on oeis.org

0, 8, 3, 25, 18, 57, 8, 169, 181, 1, 61, 164, 177, 573, 209, 785, 288, 1121, 347, 517, 549, 2219, 53, 481, 871, 3144, 878, 3336, 777, 2369, 996, 1577, 655, 5109, 936, 3040, 5290, 1698, 652, 1349, 4000, 2781, 4083, 5559, 2769, 7834, 7098, 4686, 3451, 14278, 5998
Offset: 1

Views

Author

Michel Lagneau, Apr 15 2012

Keywords

Comments

a(n) is the number of times you form the sum of the n-power of each digit of n before reaching the last number of the cycle.
Generalization and conjecture:
Let a number k. The number of iterations of the orbit k -> sum of the n - power of the decimal digits of k is finite for any exponent n and any starting value k.

Examples

			a(7) = 8 because:
7^7 = 823543;
8^7+2^7+3^7+5^7+4^7+3^7 = 2196163;
2^7+1^7+9^7+6^7+1^7+6^7+3^7 = 5345158;
5^7+3^7+4^7+5^7+1^7+5^7+8^7 = 2350099;
2^7+3^7+5^7+0^7+0^7+9^7+9^7 =  9646378;
9^7+6^7+4^7+6^7+3^7+7^7+8^7 = 8282107;
8^7+2^7+8^7+2^7+1^7+0^7+7^7 = 5018104;
5^7+0^7+1^7+8^7+1^7+0^7+4^7 = 2191663 is the end of the cycle with 8 iterations because 2191663-> 2^7+1^7+9^7+1^7+6^7+6^7+3^7 = 5345158 is already in the trajectory.
		

Crossrefs

Programs

  • Maple
    with(numtheory) : T :=array(1..20000) :W:=array(1..20000):for n from 1 to 85 do : k:=0:nn:=n:for it from 1 to 20000  do:T :=convert(nn, base, 10) :l:=nops(T):s:=sum(T[i]^n, i=1..l):k:=k+1:W[k]:=s:nn:=s:od: z:= [seq(W[i], i=1..k)]:V:=convert(z, set):n1:=nops(V): printf ( "%d %d \n",n,n1):od:
Showing 1-3 of 3 results.