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 71-80 of 121 results. Next

A221470 Least m such that the Collatz (3x+1) iteration of m has exactly n increasing peak values.

Original entry on oeis.org

1, 5, 3, 7, 15, 287, 191, 127, 223, 159, 143, 95, 63, 47, 31, 27, 703, 6471, 6383, 4255, 6887, 4591, 50427, 47867, 31911, 77671, 161439, 113383, 239231, 159487, 1027431, 974079, 730559, 487039, 432923, 288615, 270271, 3041391, 9158655, 6416623, 16786431, 12589823
Offset: 0

Views

Author

T. D. Noe, Jan 17 2013

Keywords

Comments

Sequence A221469 lists the number of increasing peaks.

Examples

			The Collatz iteration starting at 7 is (7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1), which has 3 increasing peaks: 22, 34, and 52. No number smaller than 7 has 3 increasing peaks. Hence, a(3) = 7.
		

Crossrefs

Cf. A070165 (Collatz trajectory of n), A221469.

Programs

  • Haskell
    a221470 = (+ 1 ) . fromJust . (`elemIndex` (map a221469 [1..]))
    -- Reinhard Zumkeller, Jan 18 2013
  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; nn = 20; t = Table[0, {nn}]; found = 0; n = 0; While[found < nn, n++; c = Collatz[n]; cnt = 0; mx = n; Do[If[k > mx, cnt++; mx = k], {k, c}]; If[cnt > 0 && cnt <= nn && t[[cnt]] == 0, t[[cnt]] = n; found++]]; Join[{1}, t]

A223699 Least number whose Collatz (3x+1) iteration has its maximum value at position n (counting from 1).

Original entry on oeis.org

1, 2, 4, 8, 3, 32, 21, 20, 13, 80, 15, 7, 96, 69, 68, 45, 93, 19, 61, 56, 37, 51, 72, 49, 39, 33, 43, 133, 79, 260, 115, 349, 255, 127, 27, 157, 135, 279, 123, 421, 375, 727, 219, 723, 447, 295, 740, 493, 439, 591, 657, 1281, 1159, 877, 759, 615, 519, 1603
Offset: 1

Views

Author

T. D. Noe, Mar 26 2013

Keywords

Comments

The maximum values are in A223700.

Examples

			The Collatz iteration of 15 is {15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1}. The maximum is 160, which occurs at position 11, counting from the right. Hence, a(11) = 15 because no number smaller than 15 has its maximum value at the 11 position.
		

Crossrefs

Cf. A070165 (Collatz iteration of n), A223700.

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; t= Table[c = Reverse[Collatz[n]]; Position[c, Max[c]][[1, 1]], {n, 10000}]; t2 = {}; n = 0; While[n++; p = Position[t, n, 1, 1]; p != {}, AppendTo[t2, p[[1,1]]]]; t2

A223700 The maximum value of the Collatz (3x+1) iteration beginning at A223699(n).

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 20, 40, 80, 160, 52, 96, 208, 68, 136, 280, 88, 184, 56, 112, 232, 72, 148, 304, 100, 196, 400, 808, 260, 520, 1048, 13120, 4372, 9232, 472, 916, 1888, 628, 1264, 2536, 4912, 1672, 3256, 39364, 2248, 740, 1480, 2968, 5992, 1972, 3844
Offset: 1

Views

Author

T. D. Noe, Mar 26 2013

Keywords

Examples

			The Collatz iteration of 15 is {15, 46, 23, 70, 35, 106, 53, 160, 80, 40, 20, 10, 5, 16, 8, 4, 2, 1}. The maximum is 160, which occurs at position 11, counting from the right. Hence, a(11) = 160 because no number smaller than 15 has its maximum value at the 11 position.
		

Crossrefs

Cf. A070165 (Collatz iteration of n), A223699.

Programs

  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; t= Table[c = Reverse[Collatz[n]]; Position[c, Max[c]][[1, 1]], {n, 10000}]; t3 = {}; n = 0; While[n++; p = Position[t, n, 1, 1]; p != {}, c = Collatz[p[[1,1]]]; AppendTo[t3, Max[c]]]; t3

A225570 The greedy smallest infinite reverse Collatz (3x+1) sequence.

Original entry on oeis.org

1, 2, 4, 8, 16, 5, 10, 20, 40, 13, 26, 52, 17, 34, 11, 22, 7, 14, 28, 56, 112, 37, 74, 148, 49, 98, 196, 65, 130, 43, 86, 172, 344, 688, 229, 458, 916, 305, 610, 203, 406, 812, 1624, 541, 1082, 2164, 721, 1442, 2884, 961, 1922, 3844, 7688, 15376, 5125, 10250
Offset: 1

Views

Author

David Spies, Jul 29 2013

Keywords

Comments

For each a(n) (where n > 4), a(n) = (a(n-1) - 1)/3 if the result is an odd integer not divisible by 3. Otherwise a(n) = 2 * a(n-1).
Going backwards from any term a(n) to a(1), this is the Collatz sequence for a(n). Furthermore, each term in the sequence is the smallest possible term (ignoring multiples of 3) with this property given the previous term.
Multiples of 3 are ignored because after visiting a multiple of 3, subsequent terms can only double.

Crossrefs

Programs

  • Maple
    A225570 := proc(n)
        local a;
        option remember;
        if n <= 4  then
            2^(n-1) ;
        else
            a := (procname(n-1)-1)/3 ;
            if type(a,'integer') and type(a,'odd') and modp(a,3) <> 0 then
                return a;
            else
                return procname(n-1)*2 ;
            end if;
        end if;
    end proc: # R. J. Mathar, Aug 03 2013
  • Mathematica
    last = 8; Join[{1, 2, 4, 8}, Table[test = (last - 1)/3; If[OddQ[last] || ! IntegerQ[test] || IntegerQ[test/3], last = 2*last, last = (last - 1)/3]; last, {96}]] (* T. D. Noe, Aug 11 2013 *)

A225840 Largest number less than n occurring in Collatz trajectory starting with n.

Original entry on oeis.org

1, 2, 2, 4, 5, 5, 4, 8, 8, 10, 10, 10, 13, 10, 8, 16, 17, 17, 16, 16, 20, 20, 16, 22, 20, 23, 26, 26, 23, 23, 16, 29, 26, 20, 34, 34, 34, 38, 20, 40, 32, 40, 40, 40, 40, 46, 24, 40, 44, 44, 40, 40, 53, 53, 52, 56, 52, 58, 53, 53, 61, 61, 32, 56, 58, 58, 52
Offset: 2

Views

Author

Reinhard Zumkeller, May 16 2013

Keywords

Comments

In triangle A070165: a(n)-th row is a suffix of n-th row;
a(n) = A070165(n,k) for some k with 1 <= k < A006577(n);
a(n) <> A070165(m,k) for all k with 1 <= k < A006577(n), a(n) < m < n.

Crossrefs

Cf. A187831.

Programs

  • Haskell
    a225840 n = maximum $ filter (< n) $ a070165_row n
  • Mathematica
    scoll[n_]:=Sort[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]]; Flatten[Table[scoll[n][[Flatten[Position[scoll[n],n]-1]]],{n,2,68}]] (* Jayanta Basu, May 28 2013 *)

A226123 Number of terms of the form 2^k in Collatz(3x+1) trajectory of n.

Original entry on oeis.org

1, 2, 5, 3, 5, 5, 5, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 6, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 7, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 9, 5, 5, 5, 5, 5, 5, 5, 5, 7, 9, 5, 5
Offset: 1

Views

Author

Jayanta Basu, May 27 2013

Keywords

Comments

a(n) = sum(A209229(A070165(n,k)): k=1..A006577(n)). - Reinhard Zumkeller, May 30 2013

Examples

			a(3)=5 since Collatz trajectory of 3 contains terms 1,2,4,8 and 16.
		

Crossrefs

Programs

  • Haskell
    a226123 = sum . map a209229 . a070165_row
    -- Reinhard Zumkeller, May 30 2013
  • Mathematica
    coll[n_]:=NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]; Table[Length[Select[coll[n],IntegerQ[Log[2,#]]&]],{n,87}]

A246436 Number of numbers 1,...,n not occurring in the Collatz trajectory starting with n.

Original entry on oeis.org

0, 0, 0, 1, 1, 0, 2, 4, 2, 4, 4, 3, 6, 4, 8, 11, 8, 4, 8, 12, 15, 10, 14, 13, 11, 16, 17, 12, 15, 19, 21, 26, 16, 22, 26, 16, 19, 21, 21, 31, 28, 34, 23, 28, 31, 34, 34, 36, 29, 29, 33, 40, 43, 36, 40, 36, 33, 39, 37, 44, 47, 45, 48, 57, 42, 41, 45, 53, 56
Offset: 1

Views

Author

Reinhard Zumkeller, Sep 01 2014

Keywords

Comments

a(n) = n - A159999(n).

Examples

			8-4-2-1: a(8) = #{3,5,6,7} = 4;
9-28-14-7-22-11-34-17-52-26-13-40-20-10-5-16-8-4-2-1: a(9) = #{3,6} = 2;
10-5-16-8-4-2-1: a(10) = #{3,6,7,9} = 4;
11-34-17-52-26-13-40-20-10-5-16-8-4-2-1: a(11) = #{3,6,7,9} = 4;
12-6-3-10-5-16-8-4-2-1: a(12) = #{7,9,11} = 3.
		

Crossrefs

Programs

  • Haskell
    import Data.List ((\\), genericIndex)
    a246436 n = length $ [1..n] \\ genericIndex a220237_tabf (n - 1)
  • Mathematica
    Table[Length[Complement[Range[n],NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#>1&]]],{n,70}] (* Harvey P. Dale, May 27 2018 *)

A258824 Least number k such that A258822(k) = n.

Original entry on oeis.org

1, 2, 24, 63105
Offset: 0

Views

Author

Derek Orr, Jun 11 2015

Keywords

Comments

If a(n) exists, a(n) > 10^6 for n > 3.
Excluding k = 24, for n = 2, after 29 and 34 iterations, you arrive at 29 and 34, respectively. Excluding k = 24, it appears all of the trajectories of the possible k values have length 48 or 49.
For n = 3, after 216, 234, and 252 iterations, you arrive at 216, 234, and 252, respectively. It appears all of the trajectories of the possible k values have length 317.

Examples

			For n = 24, the '3x+1' map is as follows: 24 -> 12 -> 6 -> 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1. After the 3rd iteration, we reach 3 and after the 5 iteration, we reach 5. Since 12 is the smallest number to have exactly two occurrences, a(2) = 24. Note that the length of this trajectory is 11. For all other trajectories with exactly two occurrences, the length is either 48 or 49.
		

Crossrefs

Programs

  • PARI
    Tvect(n)=v=[n]; while(n!=1, if(n%2, k=3*n+1; v=concat(v, k); n=k); if(!(n%2), k=n/2; v=concat(v, k); n=k)); v
    n=0; m=1; while(m<10^3, d=Tvect(m); c=0; for(i=1, #d, if(d[i]==i-1, c++)); if(c==n, print1(m, ", "); m=0; n++); m++)

A280409 Primes in the order that they appear in A280408, without repetitions.

Original entry on oeis.org

2, 3, 5, 7, 11, 17, 13, 23, 53, 19, 29, 41, 31, 47, 71, 107, 137, 103, 233, 263, 593, 167, 251, 283, 479, 719, 1619, 911, 1367, 577, 433, 61, 37, 59, 89, 67, 101, 43, 83, 73, 113, 79, 179, 269, 131, 197, 97, 149, 109, 173, 139, 157, 127, 191, 431, 647, 971
Offset: 1

Views

Author

Matthew Campbell, Jan 02 2017

Keywords

Crossrefs

Programs

  • Mathematica
    DeleteDuplicates@ Flatten@ Table[Select[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # > 1 &], PrimeQ], {n, 200}] (* Michael De Vlieger, Jan 02 2017 *)

A301937 a(n) is the smallest number whose Collatz ('3x+1') trajectory crosses its initial value exactly n times.

Original entry on oeis.org

1, 3, 10, 7, 6, 9, 22, 19, 14, 25, 18, 83, 62, 33, 54, 559, 108, 109, 110, 97, 188, 147, 166, 221, 146, 171, 292, 129, 194, 257, 294, 313, 342, 399, 506, 609, 462, 353, 398, 531, 834, 471, 530, 1153, 9854, 417, 470, 627, 8758, 9853, 626, 9225, 18450, 20609, 23718
Offset: 0

Views

Author

Jon E. Schoenfield, May 05 2018

Keywords

Comments

Records: 1, 3, 10, 22, 25, 83, 559, 609, 834, 1153, 9854, 18450, 20609, 23718, 31142, 35090, 41586, 80294, 283262, 377681, 427762, 789305, 887954, 887964, 1403202, 1752022, ..., . - Robert G. Wilson v, May 06 2018

Examples

			The Collatz trajectory for k=3 is 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 crosses the threshold value of 3 on exactly one iteration: the iteration on which it moves from 4 to 2. No smaller value of k shares this property, so a(1) = 3.
The Collatz trajectory for k=6 (see A304030) is nearly identical, containing, in order of appearance, the values 6, 3, 10, 5, 16, 8, 4, 2, 1; it crosses the threshold value of 6 on exactly 4 iterations (3 -> 10, 10 -> 5, 5 -> 16, and 8 -> 4). No smaller value of k shares this property, so a(4) = 6.
		

Crossrefs

Programs

  • Magma
    nMax:=54; a:=[0: n in [1..nMax]]; for k in [2..24000] do n:=0; t:=k; while t gt 1 do tPrev:=t; if IsEven(t) then t:=t div 2; else t:=3*t+1; end if; if (t-k)*(tPrev-k) lt 0 then n+:=1; end if; end while; if (n gt 0) and (n le nMax) then if a[n] eq 0 then a[n]:=k; end if; end if; end for; a;
  • Mathematica
    Collatz[n_] := NestWhileList[ If[ OddQ@#, 3# +1, #/2] &, n, # > 1 &]; f[n_] := Block[{x = Length[ SplitBy[ Collatz@ n, # < n +1 &]] - 1}, If[ OddQ@ n && n > 1, x - 1, x]]; t[] := 0; k = 1; While[k < 24000, If[ t[f[k]] == 0, t[f[k]] = k]; k++]; t@# & /@ Range@54 (* _Robert G. Wilson v, May 05 2018 *)

Formula

a(n) = min{k : A304030(k) = n}.
If the Collatz conjecture is true, then a(n) == n (mod 2) for all terms.
Previous Showing 71-80 of 121 results. Next