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.

A193585 Number of cycles under iteration of sum of squares of digits in base b.

Original entry on oeis.org

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

Views

Author

Martin Renner, Jul 31 2011

Keywords

Comments

If b>=2 and a>=b^2 then S(a,2,b)

Examples

			In the decimal system all integers go to (1) or (4, 16, 37, 58, 89, 145, 42, 20) under the iteration of sum of squares of digits, hence there is one fixed point and one cycle. Therefore a(10) = 1.
		

Crossrefs

A377088 Number of attractors under iteration of the map sending a positive integer to the product of its leading base-n digit and the sum of the squares of its base-n digits.

Original entry on oeis.org

1, 5, 2, 3, 8, 6, 11, 4, 16, 14, 23, 18, 42, 7, 24, 34, 26, 58, 98, 51, 99, 88, 51, 57, 103, 72, 89, 60, 69, 35, 78, 146, 39, 90, 73, 11, 109, 113, 71, 156, 220, 93, 176, 101, 132, 172, 187, 10, 160, 95, 221, 226, 69, 55, 163, 110, 137, 287, 168, 69, 260, 194, 208
Offset: 2

Author

N. Bradley Fox, Nathan Fox, Helen Grundman, Rachel Lynn, Changningphaabi Namoijam, Mary Vanderschoot, Oct 15 2024

Keywords

Comments

If b>=2 and a>=b^3 then E(a,2,b)

Examples

			In the decimal system all integers go to (1), (298), (46, 208, 136), (26, 80, 512, 150), or (33, 54, 205, 58, 445, 228, 144) under iteration of the map A376270, hence there are two fixed points, one 3-cycle, one 4-cycle, and one 7-cycle. Therefore a(10) = 1 + 1 + 3 + 4 + 7 = 16.
		

Crossrefs

A193586 is the analog for happy numbers.

A193594 Number of attractors under iteration of sum of cubes of digits in base b.

Original entry on oeis.org

1, 6, 9, 6, 9, 34, 11, 28, 15, 46, 22, 50, 49, 60, 86, 86, 60, 128, 22, 58, 118, 93, 64, 185, 5, 109, 102, 100, 122, 184, 51, 94, 205, 131, 173, 275, 67, 216, 131, 127, 34, 360, 114, 78, 215, 213, 393, 479, 76, 254, 634, 197, 214, 496, 348, 170, 437, 349, 290
Offset: 2

Author

Martin Renner, Jul 31 2011

Keywords

Comments

If b>=2 and a >= 2*b^3, then S(a,3,b)

Examples

			In the decimal system all integers go to (1); (153); (370); (371); (407) or (55, 250,133); (136, 244); (160, 217, 352); (919, 1459) under the iteration of sum of cubes of digits, hence there are five fixed points, two 2-cycles and two 3-cycles. Therefore a(10) = 5 + 2*2 + 2*3 = 15.
		

Crossrefs

Cf. A193586.

Programs

  • Maple
    S:=proc(n, p, b) local Q, k, N, z; Q:=[convert(n, base, b)]; for k from 1 do N:=Q[k]; z:=convert(sum(N['i']^p, 'i'=1..nops(N)), base, b); if not member(z, Q) then Q:=[op(Q), z]; else Q:=[op(Q), z]; break; fi; od; return Q; end:
    NumberOfAttractors:=proc(b) local A,i,Q; A:=[]: for i from 1 to 2*b^3 do Q:=S(i,3,b); A:=[op(A),Q[nops(Q)]]; od: return(nops({op(A)})); end:
    seq(NumberOfAttractors(b),b=2..20);
Showing 1-3 of 3 results.