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-20 of 21 results. Next

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

A193996 Numbers that require exactly 8 iterations to determine that they are happy or not (A007770 and A031177).

Original entry on oeis.org

4, 16, 20, 37, 42, 58, 89, 145, 78999, 79899, 79989, 79998, 87999, 89799, 89979, 89997, 97899, 97989, 97998, 98799, 98979, 98997, 99789, 99798, 99879, 99897, 99978, 99987, 378999, 379899, 379989, 379998, 387999, 389799, 389979, 389997, 389999, 397899, 397989
Offset: 1

Views

Author

T. D. Noe, Aug 23 2011

Keywords

Comments

This sequence begins with the last 8 numbers of A039943. The number 78999 is the first happy number here.

Programs

  • Mathematica
    f[n_] := Total[IntegerDigits[n]^2]; Select[Range[400000], Length[NestWhileList[f, #, UnsameQ, All]] - 1 == 8 &]

A364682 Number of iterations of the "x -> sum of squares of digits of x" map (A003132) for n to converge to either 0, 1 or the 8-cycle (37,58,89,145,42,20,4,16).

Original entry on oeis.org

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

Views

Author

Chai Wah Wu, Aug 02 2023

Keywords

Comments

The initial number counts as iteration 1.

Crossrefs

Programs

  • Python
    def A364682(n):
        c = 1
        while n not in {0,1,37,58,89,145,42,20,4,16}:
            n = sum((0, 1, 4, 9, 16, 25, 36, 49, 64, 81)[ord(d)-48] for d in str(n))
            c += 1
        return c

Formula

a(n) <= A193995(n) with equality if and only if n is a Happy number (A007770).
a(n) = 1 if and only if n is in A039943.
a(n) = A099645(n)+1.

A193565 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 4.

Original entry on oeis.org

2, 4, 11, 78, 87, 101, 110, 113, 131, 168, 179, 186, 197, 200, 249, 257, 259, 275, 294, 295, 311, 429, 449, 467, 476, 492, 494, 527, 529, 559, 567, 572, 576, 592, 595, 618, 647, 657, 674, 675, 681, 708, 719, 725, 746, 752, 756, 764, 765, 779, 780, 791, 797
Offset: 1

Views

Author

Martin Renner, Jul 31 2011

Keywords

Examples

			7899 is such a number of height 6 because it enters the cycle at 4 in 6 steps: 7899 -> 275 -> 78 -> 113 -> 11 -> 2 -> 4 -> 16 -> 37 -> 58 -> 89 -> 145 -> 42 -> 20 -> 4 -> ...
		

Crossrefs

Programs

  • Maple
    S:=proc(n) local Q,k,N,z; Q:=[n]; for k from 1 do N:=convert(Q[k],base,10); z:=sum(N['i']^2,'i'=1..nops(N)); if not member(z,Q) then Q:=[op(Q),z]; else Q:=[op(Q),z]; break; fi; od; return Q; end:
    a:=[]: for i from 1 while nops(a)<30 do Q:=S(i); A:=Q[nops(Q)]; if A=4 then a:=[op(a),i] fi; od: print(op(a));

A193566 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 16.

Original entry on oeis.org

15, 16, 26, 40, 51, 62, 69, 88, 96, 105, 117, 128, 134, 143, 150, 155, 156, 165, 171, 182, 206, 218, 237, 247, 260, 273, 274, 278, 279, 281, 287, 297, 314, 327, 341, 372, 399, 400, 413, 427, 431, 448, 458, 466, 472, 484, 485, 501, 510, 515, 516, 548, 551
Offset: 1

Views

Author

Martin Renner, Jul 31 2011

Keywords

Examples

			466 is such a number of height 8 because it enters the cycle at 16 in 8 steps: 466 -> 88 -> 128 -> 69 -> 117 -> 51 -> 26 -> 40 -> 16 -> 37 -> 58 -> 89 -> 145 -> 42 -> 20 -> 4 -> 16 -> ...
		

Crossrefs

Programs

  • Maple
    S:=proc(n) local Q,k,N,z; Q:=[n]; for k from 1 do N:=convert(Q[k],base,10); z:=sum(N['i']^2,'i'=1..nops(N)); if not member(z,Q) then Q:=[op(Q),z]; else Q:=[op(Q),z]; break; fi; od; return Q; end:
    a:=[]: for i from 1 while nops(a)<30 do Q:=S(i); A:=Q[nops(Q)]; if A=16 then a:=[op(a),i] fi; od: print(op(a));

A193567 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 37.

Original entry on oeis.org

3, 9, 18, 30, 33, 37, 39, 47, 56, 57, 59, 61, 65, 74, 75, 81, 90, 93, 95, 106, 108, 111, 114, 122, 125, 137, 138, 141, 144, 148, 152, 157, 158, 160, 173, 175, 178, 180, 183, 184, 185, 187, 212, 215, 221, 225, 227, 246, 251, 252, 256, 258, 264, 265, 272, 285
Offset: 1

Views

Author

Martin Renner, Jul 31 2011

Keywords

Examples

			568 is such a number of height 7 because it enters the cycle at 37 in 7 steps: 568 -> 125 -> 30 -> 9 -> 81 -> 65 -> 61 -> 37 -> 58 -> 89 -> 145 -> 42 -> 20 -> 4 -> 16 -> 37 -> ...
		

Crossrefs

Programs

  • Maple
    S:=proc(n) local Q,k,N,z; Q:=[n]; for k from 1 do N:=convert(Q[k],base,10); z:=sum(N['i']^2,'i'=1..nops(N)); if not member(z,Q) then Q:=[op(Q),z]; else Q:=[op(Q),z]; break; fi; od; return Q; end:
    a:=[]: for i from 1 while nops(a)<30 do Q:=S(i); A:=Q[nops(Q)]; if A=37 then a:=[op(a),i] fi; od: print(op(a));

A193568 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 58.

Original entry on oeis.org

38, 58, 73, 83, 116, 119, 161, 166, 191, 235, 253, 299, 307, 308, 325, 352, 357, 370, 375, 380, 468, 486, 489, 498, 523, 532, 537, 573, 611, 616, 648, 661, 679, 684, 697, 703, 730, 735, 753, 769, 796, 803, 830, 846, 849, 864, 894, 911, 929, 948, 967, 976
Offset: 1

Views

Author

Martin Renner, Jul 31 2011

Keywords

Examples

			468 is such a number of height 4 because it enters the cycle at 58 in 4 steps: 468 -> 116 -> 38 -> 73 -> 58 -> 89 -> 145 -> 42 -> 20 -> 4 -> 16 -> 37 -> 58 -> ...
		

Crossrefs

Programs

  • Maple
    S:=proc(n) local Q,k,N,z; Q:=[n]; for k from 1 do N:=convert(Q[k],base,10); z:=sum(N['i']^2,'i'=1..nops(N)); if not member(z,Q) then Q:=[op(Q),z]; else Q:=[op(Q),z]; break; fi; od; return Q; end:
    a:=[]: for i from 1 while nops(a)<30 do Q:=S(i); A:=Q[nops(Q)]; if A=58 then a:=[op(a),i] fi; od: print(op(a));

A193569 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 89.

Original entry on oeis.org

5, 6, 8, 12, 14, 17, 21, 22, 25, 27, 29, 34, 35, 36, 41, 43, 45, 46, 48, 50, 52, 53, 54, 55, 60, 63, 64, 66, 67, 71, 72, 76, 80, 84, 85, 89, 92, 99, 102, 104, 107, 112, 115, 118, 120, 121, 123, 124, 126, 127, 132, 135, 136, 140, 142, 146, 147, 151
Offset: 1

Views

Author

Martin Renner, Jul 31 2011

Keywords

Examples

			15999 is such a number of height 12 because it enters the cycle at 89 in 12 steps: 15999 -> 269 -> 121 -> 6 -> 36 -> 45 -> 41 -> 17 -> 50 -> 25 -> 29 -> 85 -> 89 -> 145 -> 42 -> 20 -> 4 -> 16 -> 37 -> 58 -> 89 -> ...
		

Crossrefs

Programs

  • Maple
    S:=proc(n) local Q,k,N,z; Q:=[n]; for k from 1 do N:=convert(Q[k],base,10); z:=sum(N['i']^2,'i'=1..nops(N)); if not member(z,Q) then Q:=[op(Q),z]; else Q:=[op(Q),z]; break; fi; od; return Q; end:
    a:=[]: for i from 1 while nops(a)<30 do Q:=S(i); A:=Q[nops(Q)]; if A=89 then a:=[op(a),i] fi; od: print(op(a));

A193570 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 145.

Original entry on oeis.org

77, 98, 145, 149, 194, 238, 283, 289, 298, 328, 358, 382, 385, 419, 456, 465, 491, 538, 546, 564, 583, 645, 654, 678, 687, 707, 768, 770, 786, 789, 798, 809, 823, 829, 832, 835, 853, 867, 876, 879, 890, 892, 897, 908, 914, 928, 941, 978, 980, 982, 987
Offset: 1

Views

Author

Martin Renner, Jul 31 2011

Keywords

Examples

			25889 is such a number of height 4 because it enters the cycle at 145 in 4 steps: 25889 -> 238 -> 77 -> 98 -> 145 -> 42 -> 20 -> 4 -> 16 -> 37 -> 58 -> 89 -> 145 -> ...
		

Crossrefs

Programs

  • Maple
    S:=proc(n) local Q,k,N,z; Q:=[n]; for k from 1 do N:=convert(Q[k],base,10); z:=sum(N['i']^2,'i'=1..nops(N)); if not member(z,Q) then Q:=[op(Q),z]; else Q:=[op(Q),z]; break; fi; od; return Q; end:
    a:=[]: for i from 1 while nops(a)<30 do Q:=S(i); A:=Q[nops(Q)]; if A=145 then a:=[op(a),i] fi; od: print(op(a));

A193571 Unhappy numbers which enter the cycle (4, 16, 37, 58, 89, 145, 42, 20) at 42.

Original entry on oeis.org

42, 154, 389, 398, 415, 451, 514, 541, 839, 893, 938, 983, 1045, 1054, 1126, 1162, 1216, 1261, 1344, 1405, 1434, 1443, 1450, 1504, 1540, 1588, 1612, 1621, 1669, 1696, 1858, 1885, 1966, 2116, 2161, 2235, 2253, 2325, 2352, 2523, 2532, 2611, 3089, 3098, 3144
Offset: 1

Views

Author

Martin Renner, Jul 31 2011

Keywords

Examples

			389 is such a number of height 2 because it enters the cycle at 42 in 2 steps: 389 -> 154 -> 42 -> 20 -> 4 -> 16 -> 37 -> 58 -> 89 -> 145 -> 42 -> ...
		

Crossrefs

Programs

  • Maple
    S:=proc(n) local Q,k,N,z; Q:=[n]; for k from 1 do N:=convert(Q[k],base,10); z:=sum(N['i']^2,'i'=1..nops(N)); if not member(z,Q) then Q:=[op(Q),z]; else Q:=[op(Q),z]; break; fi; od; return Q; end:
    a:=[]: for i from 1 while nops(a)<30 do Q:=S(i); A:=Q[nops(Q)]; if A=42 then a:=[op(a),i] fi; od: print(op(a));
Previous Showing 11-20 of 21 results. Next