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

A016945 a(n) = 6*n+3.

Original entry on oeis.org

3, 9, 15, 21, 27, 33, 39, 45, 51, 57, 63, 69, 75, 81, 87, 93, 99, 105, 111, 117, 123, 129, 135, 141, 147, 153, 159, 165, 171, 177, 183, 189, 195, 201, 207, 213, 219, 225, 231, 237, 243, 249, 255, 261, 267, 273, 279, 285, 291, 297, 303, 309, 315, 321, 327
Offset: 0

Views

Author

Keywords

Comments

Apart from initial term(s), dimension of the space of weight 2n cuspidal newforms for Gamma_0(37).
Continued fraction expansion of tanh(1/3).
If a 2-set Y and a 3-set Z are disjoint subsets of an n-set X then a(n-4) is the number of 3-subsets of X intersecting both Y and Z. - Milan Janjic, Sep 08 2007
Leaves of the Odd Collatz-Tree: a(n) has no odd predecessors in all '3x+1' trajectories where it occurs: A139391(2*k+1) <> a(n) for all k; A082286(n)=A006370(a(n)). - Reinhard Zumkeller, Apr 17 2008
Let random variable X have a uniform distribution on the interval [0,c] where c is a positive constant. Then, for positive integer n, the coefficient of determination between X and X^n is (6n+3)/(n+2)^2, that is, A016945(n)/A000290(n+2). Note that the result is independent of c. For the derivation of this result, see the link in the Links section below. - Dennis P. Walsh, Aug 20 2013
Positions of 3 in A020639. - Zak Seidov, Apr 29 2015
a(n+2) gives the sum of 6 consecutive terms of A004442 starting with A004442(n). - Wesley Ivan Hurt, Apr 08 2016
Numbers k such that Fibonacci(k) mod 4 = 2. - Bruno Berselli, Oct 17 2017
Also numbers k such that t^k == -1 (mod 7), where t is a member of A047389. - Bruno Berselli, Dec 28 2017

Crossrefs

Third row of A092260.
Subsequence of A061641; complement of A047263; bisection of A047241.
Cf. A000225. - Loren Pearson, Jul 02 2009
Cf. A020639. - Zak Seidov, Apr 29 2015
Odd numbers in A355200.

Programs

Formula

a(n) = 3*(2*n + 1) = 3*A005408(n), odd multiples of 3.
A008615(a(n)) = n. - Reinhard Zumkeller, Feb 27 2008
A157176(a(n)) = A103333(n+1). - Reinhard Zumkeller, Feb 24 2009
a(n) = 12*n - a(n-1) for n>0, a(0)=3. - Vincenzo Librandi, Nov 20 2010
G.f.: 3*(1+x)/(1-x)^2. - Mario C. Enriquez, Dec 14 2016
E.g.f.: 3*(1 + 2*x)*exp(x). - G. C. Greubel, Sep 18 2019
Sum_{n>=0} (-1)^n/a(n) = Pi/12 (A019679). - Amiram Eldar, Dec 10 2021
From Amiram Eldar, Nov 22 2024: (Start)
Product_{n>=0} (1 - (-1)^n/a(n)) = sqrt(2)/2 (A010503).
Product_{n>=0} (1 + (-1)^n/a(n)) = sqrt(3/2) (A115754). (End)
a(n) = (n+2)^2 - (n-1)^2. - Alexander Yutkin, Mar 15 2025

A177729 Positive integers which do not appear in a Collatz sequence starting from a smaller positive integer.

Original entry on oeis.org

1, 2, 3, 6, 7, 9, 12, 15, 18, 19, 21, 24, 25, 27, 30, 33, 36, 37, 39, 42, 43, 45, 48, 51, 54, 55, 57, 60, 63, 66, 69, 72, 73, 75, 78, 79, 81, 84, 87, 90, 93, 96, 97, 99, 102, 105, 108, 109, 111, 114, 115, 117, 120, 123, 126, 127, 129, 132, 133, 135, 138, 141
Offset: 1

Views

Author

Raul D. Miller, May 12 2010

Keywords

Comments

A variant of A061641, which is the main entry for this sequence.
The inclusion of 2 is apparently due to a non-standard definition of a Collatz sequence; A177729 assumes that the Collatz sequence ends when it reaches 1, whereas the standard definition includes the periodic 1,4,2,... from that point. The inclusion of 0 in A061641 is a bit odd, but is not actually wrong. One usually looks only at positive integers for Collatz sequences. - Franklin T. Adams-Watters, May 14 2010

Examples

			Collatz 1: 1; Collatz 2: 2,1; Collatz 3: 3,10,5,16,8,4,2,1; Collatz 6: 6,3,10,...
		

Crossrefs

Programs

  • Haskell
    a177729 = head . a192719_row  -- Reinhard Zumkeller, Jan 03 2013
  • Mathematica
    coll[n_]:=NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]; t={1}; Do[If[FreeQ[Union@@Table[coll[i],{i,n-1}],n],AppendTo[t,n]],{n,2,141}]; t (* Jayanta Basu, May 29 2013 *)

Formula

a(n) = A192719(n,1), see also A220263. - Reinhard Zumkeller, Jan 03 2013

A127633 Pure numbers in the Collatz (3x+1) iteration that are not multiples of 3.

Original entry on oeis.org

1, 7, 19, 25, 37, 43, 55, 73, 79, 97, 109, 115, 127, 133, 145, 151, 163, 169, 181, 187, 199, 217, 223, 235, 241, 259, 271, 277, 289, 295, 307, 313, 331, 343, 349, 361, 367, 379, 385, 397, 403, 421, 439, 451, 457, 469, 475, 487, 493, 505, 511, 523, 529, 541
Offset: 1

Views

Author

Gary W. Adamson, Jan 20 2007

Keywords

Comments

The sequence is a list of pure numbers not congruent to 0 mod 3. The remaining pure numbers are congruent to 1 or 7 mod 18.
After computing all a(n) < 10^9, the ratio a(n)/n appears to be converging to 10.101... Hence it appears that the numbers in this sequence have a density of about 99/1000. - T. D. Noe, Oct 12 2007

Crossrefs

Cf. A061641.

Formula

A positive integer n is pure if its entire tree of preimages under the Collatz function C is greater than or equal to it; otherwise n is impure [Shaw, p. 195]. For n a positive integer, the function C is defined by C(n) = {3n+1, n odd; n/2, n even}.

Extensions

Edited by N. J. A. Sloane and T. D. Noe, Oct 16 2007

A192719 Chain of Collatz sequences.

Original entry on oeis.org

1, 2, 1, 3, 10, 5, 16, 8, 4, 2, 1, 6, 3, 10, 5, 16, 8, 4, 2, 1, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 9, 28, 14, 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1, 12, 6, 3, 10, 5, 16, 8, 4, 2, 1
Offset: 1

Views

Author

Robert C. Lyons, Dec 31 2012

Keywords

Comments

The sequence is a chain of Collatz sequences. The first Collatz sequence in the chain is (1). Each of the subsequent Collatz sequences in the chain starts with the minimum positive integer that does not appear in the previous Collatz sequences. If the Collatz conjecture is true, then each Collatz sequence in the chain will end with 1, and the chain will include an infinite number of distinct Collatz sequences. If the Collatz conjecture is false, then the chain will end with the first Collatz sequence that does not converge to 1.
T(n,1) = A177729(n). - Reinhard Zumkeller, Jan 03 2013

Examples

			The first Collatz sequence in the chain is (1). The second Collatz sequence in the chain is (2, 1), which starts with 2, since 2 is the smallest positive integer that doesn't appear the first Collatz sequence. The third Collatz sequence in the chain is (3, 10, 5, 16, 8, 4, 2, 1), which starts with 3, since 3 is the smallest positive integer that doesn't appear the previous Collatz sequences.
Thus this irregular array starts:
1;
2,  1;
3, 10,  5, 16,  8,  4,  2,  1;
6,  3, 10,  5, 16,  8,  4,  2,  1;
7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10,  5, 16,  8, 4,  2, 1;
9, 28, 14,  7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1;
...
		

Crossrefs

Programs

  • Haskell
    a192719 n k = a192719_tabf !! (n-1) !! (k-1)
    a192719_row n = a192719_tabf !! (n-1)
    a192719_tabf = f [1..] where
       f (x:xs) = (a070165_row x) : f (del xs $ a220237_row x)
       del us [] = us
       del us'@(u:us) vs'@(v:vs) | u > v     = del us' vs
                                 | u < v     = u : del us vs'
                                 | otherwise = del us vs
    -- Reinhard Zumkeller, Jan 03 2013
  • Java
    See Lyons link.
    

A222118 Number of terms in Collatz (3x+1) trajectory of n that did not appear in previous trajectories.

Original entry on oeis.org

1, 1, 6, 0, 0, 1, 10, 0, 3, 0, 0, 1, 0, 0, 9, 0, 0, 1, 5, 0, 3, 0, 0, 1, 3, 0, 95, 0, 0, 1, 0, 0, 3, 0, 0, 1, 3, 0, 12, 0, 0, 1, 8, 0, 3, 0, 0, 1, 0, 0, 5, 0, 0, 1, 7, 0, 3, 0, 0, 1, 0, 0, 13, 0, 0, 1, 0, 0, 3, 0, 0, 1, 3, 0, 8, 0, 0, 1, 9, 0, 1, 0, 0, 1, 0, 0, 7
Offset: 1

Views

Author

Jayanta Basu, Feb 23 2013

Keywords

Comments

For n > 2, n such that a(n) = 0 are termed impure (A134191), while n such that a(n) > 0 are termed pure (A061641). - T. D. Noe, Feb 23 2013
From Robert G. Wilson v, Feb 25 2017: (Start)
For a(n) to be equal to 0, n != 0 (mod 3),
For a(n) to be an even positive number, n = {3, 7} (mod 12),
For a(n) to be equal to 1, n = {0, 1, 2, 3, 6, 7, 9} (mod 12),
For a(n) to be equal to 3, n = {1, 3, 9} (mod 12),
For a(n) to be an odd number > 3, n = {3, 7} (mod 12).
[Note that the above conditions are necessary but not sufficient. - Editors, Dec 15 2017]
(End)
a(n) gives the number of new terms in the n-th row of A070165 (see A263716). - Andrey Zabolotskiy, Feb 27 2017

Examples

			a(7) = 10, since trajectory of 7 includes 7, 22, 11, 34, 17, 52, 26, 13, 40, 20, which did not appear in earlier trajectories.
		

Crossrefs

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; found = {}; Table[c = Collatz[n]; r = Complement[c, found]; found = Union[found, c]; Length[r], {n, 100}] (* T. D. Noe, Feb 23 2013 *)
  • Python
    s = set([1])
    print(1)
    for n in range(2, 100):
        m, r = n, 0
        while m not in s:
            s.add(m)
            m = (m//2 if m%2==0 else 3*m+1)
            r += 1
        print(r)
    # Andrey Zabolotskiy, Feb 21 2017

Formula

a(n) = A006577(n) - A221956(n) + 1. - Michel Lagneau, Feb 23 2013

A166245 Numbers n such that the Collatz trajectory of n (iterate T(k)=k/2 if k is even, (3k+1)/2 if k is odd, A014682, starting at n and stopping if you reach 1) never exceeds n.

Original entry on oeis.org

1, 2, 4, 8, 10, 12, 16, 20, 24, 26, 28, 32, 34, 36, 40, 42, 44, 48, 50, 52, 56, 58, 64, 66, 68, 72, 74, 76, 80, 84, 88, 90, 92, 96, 98, 100, 104, 106, 112, 114, 116, 120, 122, 128, 130, 132, 136, 138, 140, 144, 148, 152, 154, 156, 160, 162, 168, 170, 172, 176, 178, 180
Offset: 1

Views

Author

Michael Higgins (mikehiggins1981(AT)gmail.com), Oct 10 2009

Keywords

Comments

Let T(n)=n/2 if n is even, (3n+1)/2 if n is odd. This function is the same as the one in the Collatz conjecture, 3x+1 problem, Kakutani's Problem, Syracuse problem etc. Then x is an element of the sequence iff T^k(x) <= x for all k. Several conjectures relating to the 3x+1 problem can be restated in terms of this set. For example: There are no nontrivial cycles iff the <= can be replaced with < in the definition of the sequence for x>2. x has bounded trajectory iff T^k(x) is an element of the sequence for some k. These two statements together are equivalent to the Collatz conjecture.

Examples

			1 is a term, because the trajectory stops right there at 1.
2 is a term because the trajectory is 2->1.
3 is not a term because the trajectory is 3 -> 5 -> 8 -> 4 -> 2 -> 1, and 5>3.
		

Crossrefs

Programs

  • Mathematica
    L1 = {}; For[i = 1, i < 4096, i++, max = i; n = i; While[n != 1 || Element[n, L1] == False, If[Mod[n, 2] == 1, n = (3 n + 1)/2; If[max <= n, max = n], n = n/2; If[max <= n, max = n]]]; Sort[DeleteDuplicates[L1]]];
    ctenQ[n_]:=Max[NestWhileList[If[EvenQ[#],#/2,(3#+1)/2]&,n,#>1&]]<=n; Select[Range[200],ctenQ] (* Harvey P. Dale, Mar 17 2017 *)
  • PARI
    is(x)=my(X);X=x;while(x!=1,x=if(x%2,(3*x+1)/2,x/2);if(x>X,return(0)));1

Extensions

Edited by Ralf Stephan, Nov 26 2013
Definition clarified by N. J. A. Sloane, Mar 17 2017

A336938 The maximum values of the sets A(n), where A(0) = {0} and A(n+1) is the union of A(n) and the Collatz orbit of the smallest natural number missing in A(n).

Original entry on oeis.org

0, 4, 16, 16, 52, 52, 52, 160, 160, 160, 160, 160, 160, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232, 9232
Offset: 0

Views

Author

Markus Sigg, Aug 08 2020

Keywords

Crossrefs

Programs

  • PARI
    firstMiss(A) = { my(i); if(#A == 0 || A[1] > 0, return(0)); for(i = 1, A[#A] + 1, if(!setsearch(A, i), return(i))); };
    iter(A) = { my(a = firstMiss(A)); while(!setsearch(A, a), A = setunion(A, Set([a])); a = if(a % 2, 3*a+1, a/2)); A; };
    makeVec(m) = { my(v = [], A = Set([0]), i); for(i = 1, m, v = concat(v, A[#A]); if (i < m, A = iter(A))); v; };
    makeVec(47)

A127928 Pure hailstone primes.

Original entry on oeis.org

3, 7, 19, 37, 43, 73, 79, 97, 109, 127, 151, 163, 181, 199, 223, 241, 271, 277, 307, 313, 331, 349, 367, 379, 397, 421, 439, 457, 487, 523, 541, 547, 601, 613, 619, 631, 673, 691, 709, 727, 757, 811, 829, 853, 883, 907, 937, 997, 1009, 1033, 1051, 1069, 1087, 1117
Offset: 1

Views

Author

Gary W. Adamson, Feb 07 2007

Keywords

Comments

In other words, pure hailstone numbers that are also primes (primes in A061641).
Impure hailstone numbers occur in the trajectories of smaller numbers, using the definition C(n) = (3n+1, n odd; n/2 if n is even). The set of pure hailstone numbers and the subset of pure, prime hailstone numbers; may be obtained through a process of elimination. The rules [cf. Shaw, p. 199] for A127928(n>1) force the terms to be == 1 or 7 mod 18; but not all primes mod 1 or 7 are in A127928. (e.g. 61 == 7 mod 18 and is prime but is not a pure hailstone number).
Shaw, p. 199: If n == 0, 3, 6, 9, 12 or 15 mod 18, then n is pure, but only 3 is prime. If n == 2, 4, 5, 8, 10, 11, 13, 14, 16 or 17 mod 18, then n is impure. If n == 1 or 7 mod 18, then n may be pure or impure.

Examples

			3 is a pure hailstone (Collatz) number since it does not appear in the orbit of 1 or 2, but 5 is impure since the iterative trajectory of 3 = (10, 5, 16, 8, 4, 2, 1).
		

Crossrefs

Extensions

More terms from Amiram Eldar, Feb 28 2020

A127930 Terms of A127928 that are prime in A006577.

Original entry on oeis.org

3, 43, 109, 163, 307, 439, 541, 619, 937, 1069, 1087, 1297, 1303, 1321, 1609, 1621, 1627, 1657, 1783, 1861, 2053, 2251, 2293, 2311, 2347, 2647, 2689, 3067, 3121, 3319, 3373, 3457, 3499, 3511, 3517, 3607, 3637, 3769, 4051, 4057, 4219, 4363, 4561, 4723, 4813, 4903
Offset: 1

Views

Author

Gary W. Adamson, Feb 07 2007

Keywords

Comments

Through a(9) the terms have the following number of 3x+1 problem steps: 7, 29, 113, 23, 37, 53, 43, 131, 173.

Examples

			3 is in the set A127930 since the iterative trajectory of 3 has 7 steps: (10, 5, 16, 8, 4, 2, 1) and 7 is prime.
		

Crossrefs

Formula

A127928 = numbers that are both pure hailstone (Collatz) and prime. A127930 = the subset having prime steps to reach 1; given the Collatz rule C(n) = {3n+1, n odd; n/2 if n is even}.

Extensions

More terms from Amiram Eldar, Feb 28 2020

A127933 Number of halving and tripling steps to reach 1 from the n-th pure hailstone number in the '3x+1' problem.

Original entry on oeis.org

0, 0, 7, 8, 16, 19, 9, 17, 20, 20, 7, 10, 23, 111, 18, 26, 21, 21, 34, 8, 29, 16, 11, 24, 112, 112, 32, 19, 107, 27, 14, 22, 115, 14, 35, 35, 22, 9, 30, 17, 17, 12, 118, 25, 25, 38, 113, 113, 69, 33, 33, 20, 20, 46, 108, 46, 121, 28, 28, 41, 15, 15, 23, 116, 116
Offset: 1

Views

Author

Gary W. Adamson, Feb 08 2007

Keywords

Comments

Previous name was: A006577(k), k = pure hailstone numbers from A061641.
Impure hailstone numbers are those which occur in the trajectories of smaller numbers. Thus 5 is impure since it occurs in the trajectory of 3.

Examples

			3 is the 3rd term of A061641, the trajectory of 3 has 7 terms: (10, 5, 16, 8, 4, 2, 1), so a(3) = 7.
		

Crossrefs

Formula

a(n) = A006577(A061641(n)).

Extensions

Offset corrected and more terms added by Amiram Eldar, Feb 28 2020
Name edited by Michel Marcus, Feb 28 2020
Showing 1-10 of 18 results. Next