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

A008463 Take sum of squares of digits of previous term; start with 9.

Original entry on oeis.org

9, 81, 65, 61, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145, 42, 20, 4, 16, 37, 58, 89, 145
Offset: 1

Views

Author

Keywords

References

  • R. Honsberger, Ingenuity in Mathematics, Random House, 1970, p. 83.

Crossrefs

Cf. A003132 (the iterated map), A003621, A039943, A099645, A031176, A007770, A000216 (starting with 2), A000218 (starting with 3), A080709 (starting with 4), A000221 (starting with 5), A008460 (starting with 6), A008462 (starting with 8), A008463 (starting with 9), A139566 (starting with 15), A122065 (starting with 74169). - M. F. Hasler, May 24 2009

Programs

  • Mathematica
    Nest[Append[#, Total[IntegerDigits[Last@ #]^2]] &, {9}, 79] (* Michael De Vlieger, Apr 29 2018 *)
    NestList[Total[IntegerDigits[#]^2]&,9,80] (* or *) PadRight[ {9,81,65,61},80,{42,20,4,16,37,58,89,145}] (* Harvey P. Dale, Sep 11 2019 *)
  • PARI
    A008463(n)=[9,81,65,61,37, 58,89,145,42,20,4,16][if(n>12,(n-5)%8+5,n)]
    /* This code has been checked as follows: */
    k=3;vector(99,n,k=A003132(k))==vector(99,n,A008463(n))
    /* The given terms have been checked as follows: */
    a=[/* paste the terms here */]; apply(A008463,[1..#a])==a \\ (End)

Formula

Periodic with period 8.
a(n) = A000218(n+1). - R. J. Mathar, May 24 2008
a(n) = A080709(n-2) for n > 4. - M. F. Hasler, May 24 2009

A099646 Function f(n) = 1 + Sum(digit^2 of n) is iterated and a(n) is the length of terminal cycle at initial value n.

Original entry on oeis.org

9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 9, 9, 9, 9, 9, 9, 1, 9, 9, 9, 1, 9, 9, 9, 9, 9, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9
Offset: 1

Views

Author

Labos Elemer, Nov 11 2004

Keywords

Comments

Iteration g(x) applied in A031176 is slightly modified to obtain actual function: f(x) = 1 + g(x). Cases of a(n) = 1 (n = 35, 36, 46, 53, 57, 63, 64, 75, 135, ...) are analogous to happy numbers A007770.

Examples

			For n = 1: iteration-list= {1,2,5,26,41,18,66,73,59,107,51,[27,54,42,21,6,37,59,107,51],27...
with t = 11 transient and c = a(1) = 9, the cycle-length;
For n = 35: list={36,46,53,[35],35,...} with transient t = 3, c = a(35) = 1 the cycle-length.
		

Crossrefs

Programs

  • Mathematica
    ed[x_] :=IntegerDigits[x]; f[x_] :=Apply[Plus, ed[x]^2]+1; itef[x_, ho_] :=NestList[f, x, ho]; tmc=Table[Length[Union[itef[w, 100]]], {w, 1, 256}]; c1=Table[Min[Flatten[Position[itef[w, Length[Union[itef[w, 100]]]] -Last[itef[w, Length[Union[itef[w, 100]]]]], 0]]], {w, 1, 256}]; (* transient-length= *) c1-1; (* cycle-length= *) c=tmc-(c1-1); (* ho=iteration number is chosen by trial and error *) (* program provides t, t+c and c lengths[=unknown-in-advance] for any similar iterations if f modified *)
    (* Second program: *)
    With[{nn = 10^3}, Table[Function[s, Length@ KeySelect[s, Length@ Lookup[s, #] > 1 &]]@ PositionIndex@ NestList[1 + Total[ IntegerDigits[#]^2] &, n, nn], {n, 105}]] (* Michael De Vlieger, Jul 24 2017 *)

A103369 Number in the 2-digitaddition sequence at which the eventually periodic part starts.

Original entry on oeis.org

1, 4, 37, 4, 89, 89, 1, 89, 37, 1, 4, 89, 1, 89, 16, 16, 89, 37, 1, 20, 89, 89, 1, 20, 89, 16, 89, 1, 89, 37, 1, 1, 37, 89, 89, 89, 37, 58, 37, 16, 89, 42, 89, 1, 89, 89, 37, 89, 1, 89, 16, 89, 89, 89, 89, 37, 37, 58, 37, 89, 37, 16, 89, 89, 37, 89, 89, 1, 16, 1, 89, 89, 58
Offset: 1

Views

Author

Eric W. Weisstein, Feb 02 2005

Keywords

Comments

a(A007770(n)) = 1; a(A031177(n)) > 1. - Reinhard Zumkeller, Mar 16 2013

Examples

			The 2-digitaddition sequence for n = 3 is {3, 9, 81, 65, 61, 37, 58, 89, 145, 42, 20, 4, 16, 37, ...}, so a(3) = 37.
		

Crossrefs

Programs

  • Haskell
    a103369 = until (`elem` a039943_list) a003132
    a103369_list = map a103369 [1..]
    -- Reinhard Zumkeller, Oct 17 2011, Aug 24 2011

A099649 Solutions to A099648(k) > k, i.e., numbers such that the largest term in the iteration of the A003132() function strictly exceeds the initial value.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 25, 26, 27, 28, 29, 30, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79
Offset: 1

Views

Author

Labos Elemer, Nov 12 2004

Keywords

Comments

The last term I encountered was a(130) = 144. Is this sequence finite? Is a(130) = 144 the final term?

Examples

			For n=7, the list of values in the trajectory is {7,49,97,130,10,1,1,1,1,1,1,1,...}; max = 130 > 7 = n, so 7 is in the sequence.
For n=32, list = {32,13,10,1,1,...}; max = 32 = n, so 32 is not in the sequence.
The sequence includes all positive integers < 145 except {1,10,13,23,31,32,44,100,103,109,129,130,133,139}.
		

Crossrefs

Programs

  • Mathematica
    ed[x_] :=IntegerDigits[x]; func[x_] :=Apply[Plus, ed[x]^2]; itef[x_, ho_] :=NestList[id2, x, 100]; ta={{0}};Do[s=Max[Union[itef[w, 100]]]; If[Greater[s, w], Print[w];ta=Append[ta, w]], {w, 1, 10000000}]; Delete[ta, 1]

Extensions

Edited by Jon E. Schoenfield, Nov 26 2017

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) .

A099648 Largest term arising in complete-iteration-list (both transient and cycle) when f(x) = A003132(x) is iterated, i.e., if digit-squares of iterate added repeatedly until steady state (= either cycle or fixed point) is reached.

Original entry on oeis.org

1, 145, 145, 145, 145, 145, 130, 145, 145, 10, 145, 145, 13, 145, 145, 145, 145, 145, 100, 145, 145, 145, 23, 145, 145, 145, 145, 100, 145, 145, 31, 32, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 145, 44, 145, 145, 145, 145, 130, 145, 145, 145, 145, 145
Offset: 1

Views

Author

Labos Elemer, Nov 12 2004

Keywords

Examples

			n=2: list = {2,4,16,37,58,89,145,42,20,4,16,37,58,...}; a(2) = max(list) = 145;
For n < 145, max > initial value except few cases. See A099649.
		

Crossrefs

Programs

  • Mathematica
    ed[x_] :=IntegerDigits[x]; func[x_] :=Apply[Plus, ed[x]^2]; itef[x_, ho_] :=NestList[id2, x, 100]; Table[Max[Union[itef[w, 100]]], {w, 1, 256}]

A099647 Function f[n]=1+Sum[digit^2 of n] is iterated as in A099646. Values x for which A099646[x]=1 are listed here. These terms are analogous to happy-numbers [=A007770].

Original entry on oeis.org

35, 36, 46, 53, 57, 63, 64, 75, 135, 138, 153, 156, 165, 183, 237, 245, 246, 254, 264, 273, 279, 297, 305, 306, 315, 318, 327, 334, 343, 347, 350, 351, 360, 372, 374, 381, 388, 406, 425, 426, 433, 437, 452, 460, 462, 473, 503, 507, 513, 516, 524, 530, 531
Offset: 1

Views

Author

Labos Elemer, Nov 11 2004

Keywords

Comments

Iteration g[x] applied in A031176 is slightly modified to obtain actual function to iterate here: f[x]=1+g[x].Initial values resulting in fixed points are collected.

Examples

			n=35 is here because list={36,46,53,[35],35,...} with transient t=3, c=1 cycle-length.
		

Crossrefs

Programs

  • Mathematica
    ed[x_] :=IntegerDigits[x]; f[x_] :=Apply[Plus, ed[x]^2]+1; itef[x_, ho_] :=NestList[f, x, ho]; tmc=Table[Length[Union[itef[w, 100]]], {w, 1, 256}]; c1=Table[Min[Flatten[Position[itef[w, Length[Union[itef[w, 100]]]] -Last[itef[w, Length[Union[itef[w, 100]]]]], 0]]], {w, 1, 256}]; Flatten[Position[tmc-(c1-1), 1]]

A355708 Irregular triangle read by rows in which row n lists the possible periods for the iterations of the map sum of n-th powers of digits.

Original entry on oeis.org

1, 1, 8, 1, 2, 3, 1, 2, 7, 1, 2, 4, 6, 10, 12, 22, 28, 1, 2, 3, 4, 10, 30, 1, 2, 3, 6, 12, 14, 21, 27, 30, 56, 92, 1, 25, 154, 1, 2, 3, 4, 8, 10, 19, 24, 28, 30, 80, 93, 1, 6, 7, 17, 81, 123
Offset: 1

Views

Author

Mohammed Yaseen, Jul 14 2022

Keywords

Examples

			Triangle begins:
  1;
  1, 8;
  1, 2, 3;
  1, 2, 7;
  1, 2, 4, 6, 10, 12, 22, 28;
  1, 2, 3, 4, 10, 30;
  1, 2, 3, 6, 12, 14, 21, 27, 30, 56, 92;
  1, 25, 154;
  1, 2, 3, 4, 8, 10, 19, 24, 28, 30, 80, 93;
  1, 6, 7, 17, 81, 123;
  ...
		

Crossrefs

Periods of sum of m-th powers of digits iterated: A031176 (m=2), A031178 (m=3), A031182 (m=4), A031186 (m=5), A031195 (m=6), A031200 (m=7), A031211 (m=8), A031212 (m=9), A031213 (m=10).
Sum of m-th powers of digits: A007953 (m=1), A003132 (m=2), A055012 (m=3), A055013 (m=4), A055014 (m=5), A055015 (m=6), A123253 (m=7), A210840 (m=8).
Previous Showing 11-18 of 18 results.