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

A261831 a(2*n-1) = 2*n-1; otherwise a(n) is the smallest even number not already present which is obtained from the existing terms by the rules of (3*n+1)-problem.

Original entry on oeis.org

1, 4, 3, 2, 5, 10, 7, 16, 9, 8, 11, 22, 13, 28, 15, 14, 17, 34, 19, 40, 21, 20, 23, 46, 25, 52, 27, 26, 29, 58, 31, 64, 33, 32, 35, 70, 37, 76, 39, 38, 41, 82, 43, 88, 45, 44, 47, 94, 49, 100, 51, 50, 53, 106, 55, 112, 57, 56, 59, 118, 61, 124, 63, 62, 65, 130, 67, 136, 69, 68, 71, 142, 73, 148, 75, 74, 77, 154, 79, 160, 81, 80
Offset: 1

Views

Author

Vladimir Shevelev, Sep 02 2015

Keywords

Comments

By the rules of the (3*n+1)-problem, an even number can appear either by the operation 3*x+1 only when x is an odd number or by the division of a number of the form 4*k by 2.
Using induction as in the proof of the Theorem in A261728, one can prove that if n == 0(mod 6), then a(n) = 2*n-2; if n == 2(mod 6), then a(n) = 2*n; if n == 4(mod 6), then a(n) = n-2.
The sequence is a permutation of the positive integers not divisible by 6 (A047253).

Examples

			Let n=28. Since 28 is of the form 6*k+4 with k=4, then a(28) = 6*4+2 = 26.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := If[OddQ[n], n, Switch[Mod[n, 6], 0, 2n-2, 2, 2n, 4, n-2]]; Array[a, 81] (* Jean-François Alcover, Sep 02 2015, from given formula *)
    LinearRecurrence[{0,0,0,0,0,2,0,0,0,0,0,-1},{1,4,3,2,5,10,7,16,9,8,11,22},90] (* Harvey P. Dale, Feb 24 2025 *)

Formula

a(2*n-1) = 2*n-1, for n>=1.
a(6*k) = 12*k-2, a(6*k+2) = 12*k+4 and a(6*k+4) = 6*k+2, for k>=0.
O.g.f.:(1+x (4+x (3+x (2+x (5+x (10+x (5+x (8+x (3+x (4+x (1+2 x)))))))))))/(-1+x^6)^2.

A261931 a(0)=1, a(1)=2, for n>=1, a(2*n) = 6*n - 2; a(2*n+1) = min(((a(2*n)-1)/3)^, (2*a(2*n))^, (2*a(2*n-1))^), where, instead of t, we write t^, if t has not appeared earlier in the sequence and is neither of the form 3*k nor of the form 6*m-2.

Original entry on oeis.org

1, 2, 4, 8, 10, 20, 16, 5, 22, 7, 28, 14, 34, 11, 40, 13, 46, 26, 52, 17, 58, 19, 64, 38, 70, 23, 76, 25, 82, 50, 88, 29, 94, 31, 100, 62, 106, 35, 112, 37, 118, 74, 124, 41, 130, 43, 136, 86, 142, 47, 148, 49, 154, 98, 160, 53, 166, 55, 172, 110, 178, 59, 184
Offset: 0

Views

Author

Vladimir Shevelev, Sep 06 2015

Keywords

Comments

Let n>=7. If n == 1 or 3 (mod 6), then a(n) = n-2; if n == 5 (mod 6), then a(n) = 2*(n-4). This could be proved by induction similar to the theorem in A261728.
The sequence is a permutation of the positive integers not divisible by 3 which are not of the form 12*s+8, s>=2.
This sequence is connected with Collatz's (3*n+1)-conjecture. For example, if n=29, then, by the formulas, 29 = a(31) => 88 = a(30) => 11 = a(13) => 34 = a(12) => 17 = a(19) => 52 = a(18) => 13 = a(15) => 40 = a(14) => 5 = a(7) => 16 = a(6) => 1 = a(0).

Examples

			At n=3, since a(1)=2 and a(2)=6*1-2=4, a(3) should be either (4-1)/3=1 or 2*a(2)=8 or 2*a(1)=4; 1 and 4 have already appeared, so a(3)=8.
At n=5, since a(3)=8 and a(4)=6*2-2=10, a(5) should be either (10-1)/3=3 or 2*a(4)=20 or 2*a(3)=16; 3 is divisible by 3, and 16 is of the form 6*t-2, so a(5)=20.
		

Crossrefs

Formula

For n>=1, a(2*n) = 6*n - 2.
For t>=1, a(6*t+1) = 6*t - 1; a(6*t+3) = 6*t+1; a(6*t+5) = 12*t + 2.
And from the name, for n>=3, a(2*n+1) = min(((a(2*n)-1)/3)^, (2*a(2*n-1))^).
Showing 1-2 of 2 results.