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

A125711 In the "3x+1" problem, let 1 denote a halving step and 0 denote an x->3x+1 step. Then a(n) is obtained by writing the sequence of steps needed to reach 1 from 2n and reading it as a decimal number.

Original entry on oeis.org

1, 3, 175, 7, 47, 431, 87791, 15, 743151, 111, 22255, 943, 751, 218863, 175087, 31, 5871, 1791727, 1431279, 239, 191, 55023, 44015, 1967, 11917039, 1775, 3515647479163389605506303638875119, 481007, 382703, 437231, 108202665749908974283165422824431, 63, 95803119
Offset: 1

Views

Author

N. J. A. Sloane, Feb 01 2007

Keywords

Examples

			6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1, so a(3) is the decimal equivalent of 10101111, which is 175.
		

Crossrefs

Programs

  • Maple
    b:= proc(n) option remember; `if`(n=1, [0$2], `if`(n::even,
         (p-> p+[1, 2^p[1]])(b(n/2)), (p-> p+[1, 0])(b(3*n+1))))
        end:
    a:= n-> b(2*n)[2]:
    seq(a(n), n=1..33);  # Alois P. Heinz, Apr 02 2025
  • Mathematica
    f[x_] := If[EvenQ[x], x/2, 3x + 1];g[n_] := FromDigits[Mod[Most[NestWhileList[f, 2n, # > 1 &]], 2, 1] - 1, 2];Table[g[n], {n, 40}] (* Ray Chandler, Feb 02 2007 *)

Extensions

Extended by Ray Chandler, Feb 02 2007

A125710 In the "3x+1" problem, let 0 denote a halving step and 1 denote an x->3x+1 step. Then a(n) is obtained by writing the sequence of steps needed to reach 1 from 2n+1 and reading it as a decimal number.

Original entry on oeis.org

4, 80, 16, 43280, 305424, 10512, 272, 87056, 2320, 665872, 64, 21520, 4860176, 1676649379371438023024192690344976, 141584, 54056611079304389108412587463696, 38414608, 5136, 1091856, 11358841104
Offset: 0

Views

Author

N. J. A. Sloane, Feb 01 2007

Keywords

Examples

			7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1, so a(3) is the
decimal equivalent of 1010100100010000, which is 43280.
		

Crossrefs

Programs

  • Mathematica
    f[x_] := If[EvenQ[x], x/2, 3x + 1];g[n_] := FromDigits[Mod[Most[NestWhileList[f, 2n + 1, # > 1 &, {2, 1}]], 2], 2];Table[g[n], {n, 0, 30}] (* Ray Chandler, Feb 02 2007 *)

Extensions

Extended by Ray Chandler, Feb 02 2007

A125754 Numbers n whose reverse binary representation has the following property: let a 0 mean "halving" and a 1 mean "k -> 3k+1". The number describes an operation k -> f_n(k). If the equation f_n(k) = k has an integer solution, n is a term in the sequence.

Original entry on oeis.org

2, 4, 10, 17, 18, 20, 24, 36, 42, 140, 145, 170, 200, 292, 561, 594, 660, 682, 792, 1059, 1136, 1553, 1800, 2340, 2730, 4150, 4274, 4297, 4308, 4389, 4433, 4490, 4634, 4696, 4705, 4741, 4804, 4876, 5133, 5164, 5218, 5254, 5400, 5409, 5668
Offset: 1

Views

Author

David Applegate, Feb 02 2007

Keywords

Comments

Suggested by A125626.
Note that f_n(x) is always a linear function of x.

Crossrefs

A125756 Numbers n whose reverse binary representation has the following property: let a 0 mean "halving" and a 1 mean "k -> 3k+1". The number describes an operation k -> f_n(k). If the equation f_n(k) = k has a positive integer solution, n is a term in the sequence.

Original entry on oeis.org

4, 36, 140, 145, 200, 292, 1059, 1136, 1553, 1800, 2340, 4150, 4274, 4297, 4308, 4389, 4433, 4490, 4634, 4696, 4705, 4741, 4804, 4876, 5133, 5164, 5218, 5254, 5400, 5409, 5668, 5712, 5761, 6244, 6290, 6312, 6448, 6466, 6662, 6800, 6976
Offset: 1

Views

Author

David Applegate, Feb 02 2007

Keywords

Comments

Suggested by A125626.
Note that f_n(x) is always a linear function of x.

Crossrefs

A125758 Numbers congruent to 4 or 7 (mod 9).

Original entry on oeis.org

4, 7, 13, 16, 22, 25, 31, 34, 40, 43, 49, 52, 58, 61, 67, 70, 76, 79, 85, 88, 94, 97, 103, 106, 112, 115, 121, 124, 130, 133, 139, 142, 148, 151, 157, 160, 166, 169, 175, 178, 184, 187, 193, 196, 202, 205, 211, 214, 220, 223, 229, 232, 238, 241, 247, 250, 256, 259, 265, 268
Offset: 1

Views

Author

N. J. A. Sloane and David Applegate, Feb 02 2007

Keywords

Comments

For a given integer m, write its binary representation in reverse order, as in A125626, A125754, etc.; let a 0 mean "halving" and a 1 mean "k -> 3k+1". Then m specifies an operation on real numbers given by k -> f_m(k). Suppose the equation f_m(k) = k has a positive integer solution for some m. Then we conjecture that the values of k are precisely the terms of this sequence.
25 is a term because we have 25 -> 76 -> 38 -> 19 -> 58 -> 29 -> 88 -> 44 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 25.
In other words, we conjecture that this sequence coincides with A125757 sorted and with duplicates removed.

Crossrefs

Programs

  • Mathematica
    Select[Range[300],MemberQ[{4,7},Mod[#,9]]&]  (* Harvey P. Dale, Mar 12 2011 *)

Formula

From R. J. Mathar, Apr 03 2009: (Start)
a(n) = a(n-1) + a(n-2) - a(n-3) = a(n-2) + 9.
a(n) + a(n+1) = A017185(n).
G.f.: x*(4+3*x+2*x^2)/((1+x)*(x-1)^2). (End)
E.g.f.: 2 + ((9*x - 5/2)*exp(x) - (3/2)*exp(-x))/2. - David Lovler, Aug 21 2022
Showing 1-5 of 5 results.