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.

A118880 a(n) is the cube of the sum of digits of n.

Original entry on oeis.org

0, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 8, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 27, 64, 125, 216, 343, 512, 729, 1000, 1331, 1728, 64, 125, 216, 343, 512, 729, 1000, 1331, 1728, 2197, 125, 216, 343, 512
Offset: 0

Views

Author

Giovanni Teofilatto, May 25 2006

Keywords

Examples

			Trajectories of x->a(x), see A182128:
1 ->1 ->1 ->1 ->1 ->1 ->1 ->1 ->1 ->...
2 ->8 ->512 ->512 ->512 ->512 ->512 ->512 ->512 ->...
3 ->27 ->729 ->5832 ->5832 ->5832 ->5832 ->5832 ->5832 ->...
4 ->64 ->1000 ->1 ->1 ->1 ->1 ->1 ->1 ->...
5 ->125 ->512 ->512 ->512 ->512 ->512 ->512 ->512 ->...
6 ->216 ->729 ->5832 ->5832 ->5832 ->5832 ->5832 ->5832 ->...
7 ->343 ->1000 ->1 ->1 ->1 ->1 ->1 ->1 ->...
8 ->512 ->512 ->512 ->512 ->512 ->512 ->512 ->512 ->...
9 ->729 ->5832 ->5832 ->5832 ->5832 ->5832 ->5832 ->5832 ->...
10 ->1 ->1 ->1 ->1 ->1 ->1 ->1 ->1 ->...
11 ->8 ->512 ->512 ->512 ->512 ->512 ->512 ->512 ->...
12 ->27 ->729 ->5832 ->5832 ->5832 ->5832 ->5832 ->5832 ->...
13 ->64 ->1000 ->1 ->1 ->1 ->1 ->1 ->1 ->...
14 ->125 ->512 ->512 ->512 ->512 ->512 ->512 ->512 ->...
- _R. J. Mathar_, Jul 08 2012
		

Crossrefs

Programs

  • Mathematica
    a[n_]:=DigitSum[n]^3; Array[a,54,0] (* Stefano Spezia, Aug 15 2024 *)
  • Python
    def a(n): return sum(map(int, str(n)))**3
    print([a(n) for n in range(54)]) # Michael S. Branicky, Dec 26 2021

Formula

a(n) = (A007953(n))^3. - R. J. Mathar, Apr 22 2010

Extensions

Name and offset corrected by Jon E. Schoenfield, Dec 26 2021

A178481 Number of steps of the map x -> A055566(x), starting at n, before reaching the end of the cycle.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, May 28 2010

Keywords

Comments

a(n) is the number of times taking the 5th powers of the sums of digits before reaching a sum seen before (reaching the last number of the cycle).
Example:
6 -> 6^5 = 7776 -> (7+7+7+6)^5 = 27^5.
27^5 = 14348907 -> (1+4+3+4+8+9+0+7)^5 = 36^5.
36^5 = 60466176, last number of the cycle because (6+0+4+6+6+1+7+6)^5 = 36^5 = 60466176 belongs to the list.
Generalization for the k-th powers and conjecture: For each k >= 1, iteration of taking the k-th powers of digit sums reaches a cycle.
Example with k = 17; start with 3.
3^17 = 129140163, sum = 27,
27^17 = 2153693963075557766310747, sum = 117,
117^17 = 144264558065210807467328187211661877, sum = 153,
153^17 = 13796036156758195415808856807283698713, sum = 189,
189^17 = 501014933601411817143935347829544613629, sum = 153 is already in the set.
[It remains unclear whether the author wanted to define iterations of (sumofdigits of n)^5, compatible with A177148 and A182128, or sumofdigits(n^5) here. I've taken the latter to be more compliant with the first terms of the original submission. - R. J. Mathar, Jul 08 2012]

Examples

			a(0) = 0 and a(1) = 0 because 0 -> 0 and 1 -> 1.
a(15) = 1 because 15^5 = 759375 -> (7+5+9+3+7+5) = 36,
36 ^5 = 60466176 -> (6+0+4+6+6+1+7+6) = 36.
		

Crossrefs

Programs

  • Maple
    A178481 := proc(n)
            local traj ,c;
            traj := n ;
            c := [n] ;
            while true do
                    traj := A055566(traj) ;
                    if member(traj,c) then
                            return nops(c)-1 ;
                    end if;
                    c := [op(c),traj] ;
            end do:
    end proc:
    seq(A178481(n),n=0..80) ; # R. J. Mathar, Jul 08 2012

A182129 Number of iterations of the orbit n -> (sum of the decimal digits of n)^n starting with n, needed to stabilize.

Original entry on oeis.org

0, 5, 3, 3, 5, 3, 3, 5, 5, 1, 6, 6, 2, 6, 9, 5, 2, 6, 2, 7, 5, 5, 6, 6, 6, 3, 5, 2, 9, 7, 6, 13, 12, 9, 5, 9, 2, 10, 9, 7, 15, 9, 7, 4, 7, 2, 6, 3, 7, 12, 6, 9, 9, 5, 2, 10, 12, 10, 14, 7, 8, 8, 11, 2, 13, 10, 5, 9, 8, 15, 9, 6, 2, 17, 13, 8, 9, 5, 15, 12
Offset: 1

Views

Author

Michel Lagneau, Apr 13 2012

Keywords

Comments

a(n) is the number of times you form the n-power of the sum of the digits before reaching the last number of the cycle.
Generalization and conjecture: Let k be a positive integer. The number of iterations of the orbit k -> (sum of the decimal digits of k)^n is finite for any exponent n and any starting value k.
Example with n = 17; start with k = 3.
3^17 = 129140163, sum of the decimal digits = 27,
27^17 = 2153693963075557766310747, sum of the decimal digits = 117,
117^17 = 144264558065210807467328187211661877, sum of the decimal digits = 153,
153^17 = 13796036156758195415808856807283698713, sum of the decimal digits = 189,
189^17 = 501014933601411817143935347829544613629, sum of the decimal digits = 153 is already in the trajectory.

Examples

			0 is in the sequence 1^1 -> 1;
For the power 2, a(2) = 5:
    2 ->       2^2 =   4;
    4 ->       4^2 =  16;
   16 ->   (1+6)^2 =  49;
   49 ->   (4+9)^2 = 169;
  169 -> (1+6+9)^2 = 256 is the end of the cycle because 256 -> (2+5+6)^2 = 169 is already in the trajectory. Hence we obtain the map: 2 -> 4 -> 16 -> 49 -> 169 -> 256 with 5 iterations.
		

Crossrefs

Programs

  • Maple
    with(numtheory) : T :=array(1..500) :W:=array(1..500):for n from 1 to 80 do : k:=0:nn:=n:for it from 1 to 50 do:T :=convert(nn,base,10) :l:=nops(T):s1:=sum(T[i],i=1..l):s:=s1^n: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, `,n1):od:
Showing 1-3 of 3 results.