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.

A160862 a(n) = length of period of transformation sum-digit-square: given a number m(k) define m(k+1) to be the sum of the squares of the decimal digits of m(k) and iterate until m(s) is found such that m(s)=m(k) with k

Original entry on oeis.org

1, 8, 12, 8, 11, 16, 5, 12, 11, 1, 9, 12, 2, 13, 10, 8, 12, 12, 4, 8, 11, 13, 3, 8, 10, 12, 13, 3, 9, 13, 2, 3, 12, 11, 12, 15, 8, 9, 13, 8, 13, 8, 11, 4, 14, 11, 11, 13, 4, 11, 10, 10, 12, 14, 12
Offset: 1

Views

Author

Carmine Suriano, May 29 2009

Keywords

Examples

			a(1)=1 since 1^2=1; a(2)=8 since the period contains 8 numbers: 4,16,37,58,89,145,42,20 the following being 4 again.
a(5)=11 since the sequence runs as follows:
25,29, 85, 89, 145, 42, 20, 4, 16, 37, 58 the next term being 89 that is already there.
		

References

  • C. Suriano, Miniature Matematiche, unpublished, 2009, section 30

Crossrefs

Cf. A152077.

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.