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 11-20 of 255 results. Next

A346782 Numbers k such that A006577(k!) sets a new record.

Original entry on oeis.org

2, 3, 4, 5, 7, 8, 9, 11, 12, 14, 17, 21, 26, 29, 33, 34, 37, 44, 45, 47, 48, 51, 52, 55, 58, 61, 70, 78, 85, 89, 91, 92, 93, 96, 97, 98, 105, 107, 113, 114, 118, 124, 129, 135, 145, 148, 149, 150, 152, 157, 161, 173, 175, 179, 184, 192, 201, 205, 206, 209, 212, 213
Offset: 1

Views

Author

Hugo Pfoertner, Aug 04 2021

Keywords

Crossrefs

The corresponding record numbers of steps are A346783.

Programs

  • PARI
    a6577(n0)={my(n=n0,k=0);while(n>1,k++;n=if(n%2,3*n+1,n/2));k};
    a346782(limit)={my(msteps=0);for(k=0,limit,my(m=a6577(k!));if(m>msteps,print1(k,", ");msteps=m))};
    a346782(215)

A346783 a(n) = A006577(A346782(n)), records in A070974.

Original entry on oeis.org

1, 8, 10, 20, 41, 44, 86, 147, 210, 264, 426, 500, 559, 633, 795, 950, 1069, 1171, 1218, 1327, 1330, 1342, 1402, 1551, 1672, 1974, 2274, 2528, 2725, 2730, 2911, 2928, 2994, 3117, 3315, 3443, 3495, 3524, 4061, 4347, 4651, 4703, 4818, 5049, 5322, 5447, 5449, 5756
Offset: 1

Views

Author

Hugo Pfoertner, Aug 04 2021

Keywords

Crossrefs

Programs

  • PARI
    a6577(n0)={my(n=n0, k=0); while(n>1, k++; n=if(n%2, 3*n+1, n/2)); k};
    a346783(limit)={my(msteps=0);for(k=0,limit,my(m=a6577(k!));if(m>msteps,print1(m,", ");msteps=m))};
    a346783(150)

A066904 Triangular numbers in A006577.

Original entry on oeis.org

1, 3, 6, 15, 15, 10, 10, 21, 21, 21, 6, 105, 105, 28, 28, 28, 28, 28, 15, 15, 15, 15, 15, 15, 36, 36, 36, 36, 10, 10, 10, 21, 21, 21, 21, 21, 21, 21, 78, 21, 91, 91, 55, 55, 55, 45, 45, 45, 45, 45, 45, 45, 45, 45, 120, 120, 120, 120, 120, 120, 120, 120, 66, 66, 136, 136
Offset: 0

Views

Author

K. B. Subramaniam (kb_subramaniambalu(AT)yahoo.com), Dec 20 2001

Keywords

Crossrefs

Cf. A006577.

Programs

  • Mathematica
    Select[Table[Length[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#!=1&]]-1, {n,1000}],OddQ[Sqrt[8#+1]]&] (* Harvey P. Dale, Feb 06 2015 *)

Extensions

More terms from Sascha Kurz, Mar 23 2002

A066905 Squares in A006577.

Original entry on oeis.org

0, 1, 16, 9, 9, 4, 16, 16, 16, 9, 9, 9, 25, 25, 25, 25, 25, 100, 121, 36, 36, 36, 36, 49, 16, 16, 16, 16, 16, 16, 16, 16, 81, 81, 9, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 100, 100, 100, 25, 144, 25, 100, 25, 25, 144, 144, 25, 25, 144, 64, 64, 64, 64, 64, 25, 25, 64, 64
Offset: 1

Views

Author

K. B. Subramaniam (kb_subramaniambalu(AT)yahoo.com), Dec 20 2001

Keywords

Crossrefs

Programs

  • Mathematica
    steps[ n_ ] := For[ nn=n; ct=0, True, ct++, If[ nn==1, Return[ ct ] ]; nn=If[ EvenQ[ nn ], nn/2, 3nn+1 ] ]; Select[ steps/@Range[ 1, 1000 ], IntegerQ[ Sqrt[ # ] ]& ]

Extensions

More terms from Dean Hickerson, Jan 19 2002
Offset 1 from Michel Marcus, Jul 25 2021

A213198 Number of iterations of the map n -> f(f(f(...f(n)...))) to reach the end of the cycle, where f(n) = A006577(n), the initial number n is not counted.

Original entry on oeis.org

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

Views

Author

Michel Lagneau, Mar 01 2013

Keywords

Comments

A006577 is the number of halving and tripling steps to reach 1 in '3x+1' problem.
The end of the cycle is 1 or 5 for n = 5, 32, 57, 59, 344, 346, 348, 349, ...

Examples

			a(3) = 5 because the 5 iterations to reach 1 are A006577(3) = 7; A006577(7) = 16; A006577(16) = 4; A006577(4) = 2; A006577(2) = 1.
a(5) = 0 because A006577(5) = 5 is the end of the cycle.
a(57) = 2 because A006577(57) = 32 and A006577(32) = 5 is the end of the cycle.
		

Crossrefs

Cf. A006577.

Programs

  • Maple
    for n from 1 to 200 do:
        m:=n: a:=2:
        for it from 1 to 1000
        while (a>1) do:
            jj:=0: a:=0: x:=m:
            if m=5 then
                printf(`%d, `, it-1): jj:=1:
            else
                for i from 1 to 1000
                while (x>1) do:
                    if irem(x, 2)=0 then
                        x := x/2: a := a+1:
                    else
                        x := 3*x+1: a := a+1:
                    fi:
                od:
                m:=a:
            fi:
        od:
        if jj=0 then
            printf(`%d, `, it-1):
        fi:
    od:
  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; f[n_] := Length[Collatz[n]] - 1; Table[k = Rest[NestWhileList[f, n, UnsameQ, All]]; If[k[[1]] == n, 0, k = DeleteCases[k, 0]; If[Length[k] > 1 && k[[-1]] == k[[-2]], k = Most[k]]; Length[k]], {n, 100}] (* T. D. Noe, Mar 01 2013 *)

A221947 Smallest number k (different from a power of 2) such that A006577(n*k) = A006577(n) + A006577(k), or 0 if no such number exists.

Original entry on oeis.org

3, 3, 423, 3, 81, 423, 75, 3, 0, 81, 11003, 423, 155, 75, 35, 3, 239, 0, 151, 81, 23, 11003, 21, 423, 21, 155, 341, 75, 201, 35, 75, 3, 21, 239, 15, 0, 113, 151, 21, 81, 635, 23, 1131, 11003, 2017, 21, 75, 423, 1267, 21, 75, 155, 253, 341, 151, 75, 7931, 201, 75, 35, 69, 75, 213, 3, 1073, 21, 423, 239, 61, 15
Offset: 1

Views

Author

Michel Lagneau, Feb 25 2013

Keywords

Comments

A006577 is the number of halving and tripling steps to reach 1 in the '3x+1' problem. If n is a power of 2, a(n) = 3.
If k is a power of 2, we obtain trivial results, for example A006577(n*2^m) = A006577(2^m) + A006577(n) = m + A006577(n) => the smallest k is 1.
It appears that a(n) = 0 for n of the form 9*2^a = 9, 18, 36, 72, ...

Examples

			a(3) = 423 because A006577(3*423) = A006577(1269) = 39, and A006577(3) + A006577(423) = 7 + 32 = 39.
		

Crossrefs

Programs

  • Maple
    lst:={ }:C:= proc(n) a := 0 ; x := n ; while x > 1 do if type(x, 'even') then x := x/2:a:=a+1:  else x := 3*x+1 ; a := a+1 ; end if; end do; a ; end proc:
    for m from 0 to 40 do:lst:=lst union {2^m}:od:for n from 1 to 73 do: ii:=0:for k from 2 to 50000 while(ii=0) do:z:=n*k : if {k} intersect lst = {} and C(z)=C(n)+C(k) then ii:=1: printf ( "%d %d \n",n,k):else fi:od: if ii=0 and {n} intersect lst = {} and {k} intersect lst = {} then printf ( "%d %d \n",n,0):else fi:od:

A277962 Least k such that A006577(k) = A006577(n) + A006577(n+1).

Original entry on oeis.org

2, 6, 12, 3, 34, 49, 9, 72, 98, 18, 25, 28, 33, 39, 36, 7, 57, 406, 65, 11, 72, 86, 98, 114, 114, 129, 913, 153, 153, 171, 27, 172, 203, 33, 39, 270, 270, 295, 270, 290, 290, 305, 361, 57, 57, 386, 73, 78, 481, 481, 78, 72, 514, 20174, 609, 641, 641, 641, 641
Offset: 1

Views

Author

Michel Lagneau, Nov 06 2016

Keywords

Comments

A006577(n) is the number of halving and tripling steps to reach 1 in the '3x+1' problem.
The distinct squares in the sequence are 9, 25, 36, 49, 169, 361, ...
The distinct primes in the sequence are 2, 3, 7, 11, 31, 41, 47, 71, 73, 97, 103, ...

Examples

			a(5)=34 because A006577(34) = 13 = A006577(5) + A006577(6) = 5 + 8.
		

Crossrefs

Cf. A006577.

Programs

  • Maple
    nn:=3*10^6:U:=array(1..nn):V:=array(1..nn):
    for i from 1 to nn do:
    m:=i:it0:=0:
       for j from 1 to nn while(m<>1) do:
        if irem(m, 2)=0
         then
         m:=m/2:it0:=it0+1:
         else
         m:=3*m+1:it0:=it0+1:
        fi:
       od:
       U[i]:=it0:
      od:
       for n from 1 to 60 do:
       ii:=0:
        for k from 1 to nn while(ii=0) do:
         if U[k]=U[n]+ U[n+1]
          then
          ii:=1:printf(`%d, `, k):
          else
         fi:
        od:
    od:
  • Mathematica
    f:=Table[Length[NestWhileList[If[EvenQ[#],#/2,3#+1]&,n,#!=1&]]-1,{n,3*10^6}];Do[k=1;While[f[[k]]!=f[[m]]+f[[m+1]],k++];Print[m," ",k],{m,1,60}]

A281665 Numbers m such that A006667(m)/A006577(m) = 1/3.

Original entry on oeis.org

159, 283, 377, 502, 503, 603, 615, 668, 669, 670, 799, 807, 888, 890, 892, 893, 1063, 1065, 1095, 1186, 1187, 1188, 1189, 1190, 1417, 1435, 1580, 1581, 1582, 1585, 1586, 1587, 1889, 1913, 1947, 1959, 1963, 2104, 2106, 2108, 2109, 2113, 2114, 2115, 2119, 2518
Offset: 1

Views

Author

Michel Lagneau, Jan 31 2017

Keywords

Comments

A006667: number of tripling steps to reach 1 in '3x+1' problem.
A006577: number of halving and tripling steps to reach 1 in '3x+1' problem.
The corresponding number of iterations A006577(a(n)) is given by the sequence 54, 60, 63, 66, 66, 69, 69, 69, 69, 69, 72, 72, 72, 72, 72, 72, 75, 75, ... and the set of the distinct values of this sequence is {b(n)} = {54, 60, 63, 66, 69, 72, 75, 78, 81, 84, 87, 90, 93, 96, 99, 102, 105, 108, 111, 114, 117, 120, ...}. We observe that {b(k)} = {54} union {60 + 3*k} for k = 1, 2, ...

Examples

			159 is in the sequence because A006667(159)/A006577(159) = 18/54 = 1/3.
		

Crossrefs

Programs

  • Maple
    nn:=10000:
    for n from 2 to 3000 do:
      m:=n:s1:=0:s2:=0:
       for i from 1 to nn while(m<>1) do:
        if irem(m,2)=0
         then
         s2:=s2+1:m:=m/2:
         else
         s1:=s1+1:m:=3*m+1:
        fi:
       od:
       s:=s1/(s1+s2):
        if s=1/3
         then
         printf(`%d, `,n):
         else
        fi:
    od:

A058261 a(n) = n times the Collatz number of n (as given in A006577).

Original entry on oeis.org

0, 2, 21, 8, 25, 48, 112, 24, 171, 60, 154, 108, 117, 238, 255, 64, 204, 360, 380, 140, 147, 330, 345, 240, 575, 260, 2997, 504, 522, 540, 3286, 160, 858, 442, 455, 756, 777, 798, 1326, 320, 4469, 336, 1247
Offset: 0

Views

Author

Felix Goldberg (felixg(AT)tx.technion.ac.il), Dec 17 2000

Keywords

Examples

			a(4)=8 because the Collatz number of 4 is 2 (4 -> 2 -> 1) and then 8=4*2.
		

Formula

a(n) = n*Collatz(n)

A174550 Run lengths of 2 or larger for consecutive prime numbers in A006577.

Original entry on oeis.org

3, 2, 2, 2, 2, 2, 4, 2, 3, 3, 2, 2, 3, 3, 4, 2, 5, 4, 3, 2, 3, 4, 2, 2, 2, 2, 3, 3, 2, 5, 2, 2, 3, 2, 3, 2, 2, 3, 8, 2, 4, 2, 2, 2, 2, 2, 3, 3, 3, 6, 3, 4, 2, 2, 3, 3, 2, 2, 4, 2, 2, 3, 6, 2, 3, 2, 2, 2, 5, 2, 2, 2, 2, 2, 2, 2, 5, 3, 2, 4, 3, 5, 3, 3, 2, 8, 2, 2, 2, 2, 3, 8, 4, 3, 3, 3, 4, 2, 3, 8, 2, 3, 3, 5, 3
Offset: 1

Views

Author

Michel Lagneau, Mar 22 2010

Keywords

Comments

This sequence is given only for n <=5000 with max(s(n)) = 10. But we can find long sequences of primes, for example,length(s(12956))= 55, and corresponding to A006577(282984 + k), k = 0,1,...,54. We obtain a sequence of 55 consecutive prime numbers given in the example below.

Examples

			a(1) = 3 represents the run (7, 2, 5).
a(2) = 2 represents the run (3, 19).
a(3) = 2 represents the run (17, 17).
a(7) = 4 represents the run (19, 19, 107, 107).
a(12956) = 55 represents the run (83, 251, 83, 251, 127, 127, 127, 251, 83, 83, 83, 83, 83, 83, 83, 83, 83, 251, 83, 83, 83, 83, 83, 83, 101, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 251, 251, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83, 83)
		

Crossrefs

Programs

  • Maple
     nn:=2000:T:=array(1..nn):for n from 1 to nn do: m:=n:for p from 0 to 1000 while (m<>1) do: if irem(m,2)=1 then m:=3*m+1:else m:=m/2:fi:od:T[n]:=p:od:ii:=1:for i from 1 to nn do:if type(T[i],prime)=true and type(T[i+1],prime)=true then ii:=ii+1:else if ii<>1 then printf(`%d, `, ii):ii:=1:else fi:fi:od:
Previous Showing 11-20 of 255 results. Next