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

A159945 Let f be defined as in A159885. Then a(n) = max{A000120(f^i(2n+1)): 1 <= i <= A159885(n)}.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Apr 27 2009

Keywords

Comments

Problem: find an upper estimate for a(n).

Crossrefs

Programs

  • PARI
    A006519(n) = (1<A006519((3*((n-1)/2))+2); \\ Defined for odd n only. Cf. A075677.
    A159945(n) = { my(w=hammingweight(n), m = 0, n = (n+n+1)); for(k=1,oo,n = f(n); m = max(m,hammingweight(n)); if(hammingweight(n) <= w, return(m))); }; \\ Antti Karttunen, Sep 22 2018

Extensions

More terms from Antti Karttunen, Sep 22 2018

A160198 a(n) = min(A122458(n), A159885(n)).

Original entry on oeis.org

2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 4, 1, 3, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 2, 1, 13, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 4, 1, 2
Offset: 1

Views

Author

Vladimir Shevelev, May 04 2009

Keywords

Comments

Let f(2n+1) = A000265(3n+2) be defined as in A159885. Then a(n) is the least number k of iterations such that either f^k(2n+1) < 2n+1 or A000120(f^k(2n+1)) < A000120(2n+1).
Using induction, one can prove that the Collatz (3x+1)-conjecture follows from the finiteness of a(n) for every n. - Vladimir Shevelev, May 05 2009

Crossrefs

Programs

  • Maple
    A000265 := proc(n) option remember ; local a; a := n ; while a mod 2 = 0 do a := a/2 ; end do; a; end proc:
    f := proc(n) local m ; m := (n-1)/2 ; A000265(3*m+2) ; end:
    A000120 := proc(n) local d; add(d, d=convert(n,base,2)) ; end proc:
    A159885 := proc(n) local k, twon1; k := 0 ; twon1 := 2*n+1 ; while ( A000120(twon1) > A000120(n) ) do twon1 := f(twon1) ; k := k+1 ; end do; k ; end proc:
    A122458 := proc(n) local tx1,a; a := 0 ; tx1 := 2*n+1 ; while tx1 >= 2*n+1 do if tx1 mod 2 = 0 then tx1 := tx1/2 ; else tx1 := 3*tx1+1 ; a := a+1 ; fi; end do; a ; end proc:
    A160198 := proc(n) min(A159885(n),A122458(n)) ; end: seq(A160198(n),n=1..130) ; # R. J. Mathar, May 15 2009
  • Mathematica
    a[n_] := Module[{u=2n+1, w, k=0}, w = DigitCount[u, 2, 1]; While[u >= 2n+1 && DigitCount[u, 2, 1] >= w, k++; u = (3(u-1)/2+2)/2^IntegerExponent[ (3(u-1)/2+2), 2]]; k];
    Array[a, 105] (* Jean-François Alcover, Apr 16 2020, after Antti Karttunen *)
  • PARI
    f(n) = ((3*((n-1)/2))+2)/A006519((3*((n-1)/2))+2);  \\ Defined for odd n only. Cf. A075677.
    A006519(n) = (1<A160198(n) = { my(u = (n+n+1), w = hammingweight(u), k=0); while((u >= (n+n+1))&&(hammingweight(u) >= w), k++; u = f(u)); (k); }; \\ Antti Karttunen, Sep 22 2018

Extensions

a(1) corrected and sequence extended by R. J. Mathar, May 15 2009

A160266 Let f and its k-fold iteration f^k be defined as in A159885. a(n) is the least k for which A006694( (f^k(2n+1)-1)/2 ) < A006694(n).

Original entry on oeis.org

2, 1, 1, 2, 4, 2, 1, 1, 6, 1, 2, 1, 1, 5, 1, 1, 1, 6, 1, 4, 3, 1, 2, 1, 1, 2, 1, 1, 10, 5, 1, 1, 8, 1, 1, 1, 1, 1, 2, 1, 40, 1, 1, 1, 1, 1, 6, 3, 1, 7, 17, 1, 36, 1, 1, 2, 1, 1, 1, 20, 1, 1, 1, 1, 8, 1, 1, 18, 13, 1, 5, 1, 2, 6, 1, 1, 1, 1, 1, 1, 6, 1, 9, 11, 2, 9, 1, 2, 9, 4, 6, 1, 1, 1, 9, 7, 1, 7, 29, 2, 2, 1
Offset: 1

Views

Author

Vladimir Shevelev, May 07 2009

Keywords

Comments

Conjecture. For every n>=1, there exists a finite value of a(n). It is easy to see that this conjecture is equivalent to the well known Collatz 3n+1 conjecture.

Crossrefs

Programs

  • Maple
    A006519 := proc(n) local i ; for i in ifactors(n)[2] do if op(1,i) = 2 then return op(1,i)^op(2,i) ; fi ; od: return 1 ; end proc:
    f := proc(twon1) local threen2 ; threen2 := 3*twon1/2+1/2 ; threen2/A006519(threen2) ; end proc:
    A160266 := proc(n) local ref,k,fk ; ref := A006694(n) ; k := 1 ; fk := f(2*n+1) ; while true do if A006694( (fk-1)/2 ) < ref then return k; end if; fk := f(fk) ; k := k+1 ; end do ; end proc:
    seq(A160266(n),n=1..120) ; # R. J. Mathar, Feb 02 2010
  • Mathematica
    A006519[n_] := Do[If[fi[[1]] == 2, Return[2^fi[[2]]], Return[1]], {fi, FactorInteger[n]}];
    f[n_] := With[{n2 = 3 n/2 + 1/2}, n2/A006519[n2]];
    A006694[n_] := Sum[EulerPhi[d]/MultiplicativeOrder[2, d], {d, Divisors[2n + 1]}] - 1;
    a[n_] := Module[{ref, k, fk}, ref = A006694[n]; k = 1; fk = f[2n + 1]; While[True, If[A006694[(fk - 1)/2] < ref, Return[k]]; fk = f[fk]; k++]];
    Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Aug 28 2024, after R. J. Mathar *)
  • PARI
    f(n) = ((3*((n-1)/2))+2)/A006519((3*((n-1)/2))+2);
    A006519(n) = (1<A006694(n) = (sumdiv(2*n+1, d, eulerphi(d)/znorder(Mod(2, d))) - 1); \\ From A006694
    A160266(n) = { my(w=A006694(n), n = (n+n+1), k=0); while(A006694((n-1)/2) >= w, k++; n = f(n)); (k); }; \\ Antti Karttunen, Sep 22 2018

Extensions

More terms from R. J. Mathar, Feb 02 2010

A160364 Let f be defined as in A159885 and f^k be the k-th iteration of f. Then a(n) is the least k for which either {A000120(f^k(2n+1)) < A000120(2n+1)}&{A006694((f^k(2n+1)-1)/2)<=A006694(n)} or {A000120(f^k(2n+1))<=A000120(2n+1)}&{A006694((f^k(2n+1)-1)/2) < A006694(n)}.

Original entry on oeis.org

2, 1, 1, 5, 3, 1, 1, 2, 5, 1, 2, 1, 1, 1, 1, 5, 2, 5, 3, 33, 3, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 5, 7, 1, 5, 10, 1, 1, 2, 5, 5, 1, 1
Offset: 1

Views

Author

Vladimir Shevelev, May 11 2009

Keywords

Comments

Using induction, one can prove that the Collatz (3x+1)-conjecture follows from the finiteness of a(n) for every n.

Examples

			Beginning with n=1, we have f(2n+1)=f(3)=5. Here A000120(3)=A000120(5)=2 and A006694((3-1)/2)= A006694((5-1)/2)=1. None of values did not become less than. Therefore a(1)>1. Since f(5)=1 and A000120(1)=1 and A006694(0)=0, then a(2)=2.
		

Crossrefs

A160267 Minimum of A122458(n) and A160266(n).

Original entry on oeis.org

2, 1, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 2, 1, 1, 1, 1, 1, 4, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 5, 1, 1, 1, 17, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 4, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 9, 1, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 8, 1, 1, 1, 5, 1, 2, 1, 1, 1, 2, 1
Offset: 1

Views

Author

Vladimir Shevelev, May 07 2009, May 11 2009

Keywords

Comments

Let f be the operation defined in A159885, namely f(2n+1) = A075677(n+1), and f^k its k-fold iteration.
Then a(n) is the smallest k such that either f^k(2n+1)< 2n+1 or A006694((f^k(2n+1)-1)/2) < A006694(n).

Crossrefs

Programs

  • PARI
    f(n) = ((3*((n-1)/2))+2)/A006519((3*((n-1)/2))+2); \\ Defined for odd n only. Cf. A075677.
    A006519(n) = (1<A006694(n) = (sumdiv(2*n+1, d, eulerphi(d)/znorder(Mod(2, d))) - 1); \\ From A006694
    A160267(n) = { my(w=A006694(n), u = (n+n+1), k=0); while((u >= (n+n+1))&&(A006694((u-1)/2) >= w), k++; u = f(u)); (k); }; \\ Antti Karttunen, Sep 22 2018

Extensions

a(47) corrected and more terms appended by R. J. Mathar, Aug 08 2010

A160322 a(n) = min(A160198(n), A160267(n)).

Original entry on oeis.org

2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 9, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 2
Offset: 1

Views

Author

Vladimir Shevelev, May 08 2009, May 11 2009

Keywords

Comments

Let f be defined as in A159885. Then a(n) is the least k such that either f^k(2n+1))<2n+1 or A000120(f^k(2n+1)) < A000120(2n+1) or A006694((f^k(2n+1)-1)/2) < A006694(n).
In connection with A160198, A160267, A160322 we pose a new (3x+1)-problem: does there exist a finite number of sequences A_i(n), i=1,...,T, such that: 1) A_i(0)=0 and A_i(n)>0 for n>=1; 2) if B_i(n) denotes the least k for which A_i(n)>A_i((f^k(2n+1)-1)/2), then B(n)=min_{i=1,...,T}B_i(n)=1 for every n>=1? Note that this problem is weaker than (3x+1)-Collatz problem. Indeed, if the Collatz conjecture is true, then there exist nonnegative sequences A(n) for which A(0)=0 and A(n)>A((f(2n+1)-1)/2) for every n>=1 (see A160348). - Vladimir Shevelev, May 15 2009

Crossrefs

Programs

  • PARI
    f(n) = ((3*((n-1)/2))+2)/A006519((3*((n-1)/2))+2); \\ Defined for odd n only. Cf. A075677.
    A006519(n) = (1<A006694(n) = (sumdiv(2*n+1, d, eulerphi(d)/znorder(Mod(2, d))) - 1); \\ From A006694
    A160322(n) = { my(v=A006694(n), u = (n+n+1), w = hammingweight(u), k=0); while((u >= (n+n+1))&&(hammingweight(u) >= w)&&(A006694((u-1)/2) >= v), k++; u = f(u)); (k); }; \\ Antti Karttunen, Sep 25 2018

Formula

a(n) = min(A122458(n), A159885(n), A160266(n)). - Antti Karttunen, Sep 25 2018

Extensions

a(1) corrected and sequence extended by Antti Karttunen, Sep 25 2018

A160348 Minimal recursive sequence such that if a(n) > 0 then always a(n) > a((f(2n+1)-1)/2), where f is defined by f(2n+1) = (3n+2)/A006519(3n+2) for n>=1, that is f(m) = A075677(2*m-1) for odd m.

Original entry on oeis.org

0, 2, 1, 6, 7, 5, 3, 11, 4, 13, 14, 10, 15, 52, 12, 50, 53, 9, 54, 59, 51, 62, 63, 49, 60, 65, 8, 68, 69, 58, 16, 75, 61, 56, 76, 48, 77, 80, 64, 84, 85, 67, 78, 88, 57, 44
Offset: 0

Views

Author

Vladimir Shevelev, May 10 2009; corrected May 13 2009, May 19 2009

Keywords

Comments

If the (3x+1)-Collatz conjecture is true, then this sequence is a permutation of the nonnegative integers.

Examples

			a(0)=0. Let m=3. Then f(m)=5, f^2(m)=1. The corresponding numbers n=(m-1)/2 are 1,2,0. By the condition, a(1) > a(2) > a(0)=0. Therefore let a(2)=1, a(1)=2. Furthermore, consider m=7. Then f(m)=11, f^2(m)=17, f^3(m)=13, f^4(m)=5. The corresponding numbers n=(m-1)/2 are 3,5,8,6,2 and, by the condition, a(3) > a(5) > a(8) > a(6) > a(2)=1. Therefore set a(6)=3 (the minimal value which yet did not appear), a(8)=4, a(5)=5, a(3)=6, etc.
		

Crossrefs

Extensions

Name edited by Michel Marcus, Feb 01 2021

A160268 Odd numbers k for which A006694( (k-1)/2 )< A006694( (A000265(3k+1)-1)/2 ) .

Original entry on oeis.org

11, 23, 37, 41, 43, 59, 61, 79, 83, 97, 103, 107, 113, 121, 139, 143, 147, 149, 163, 167, 169, 171, 173, 177, 181, 183, 191, 193, 199, 201, 203, 227, 237, 243, 249, 251, 263, 271, 283, 287, 289, 293, 303, 313, 317, 321, 323, 347, 351, 353, 355, 359, 363, 367, 373, 379
Offset: 1

Views

Author

Vladimir Shevelev, May 07 2009

Keywords

Comments

Conjecture: For every k in the sequence, the number k^2 is in the sequence as well.
Composite numbers in the sequence which are not perfect squares are 143, 147, 171, 183 etc. [R. J. Mathar, May 16 2009]

Crossrefs

Extensions

Edited and extended by R. J. Mathar, May 16 2009

A160558 a(n) is the ordinal number of series in which the value of A160348(n) is defined.

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 2, 4, 2, 5, 6, 4, 7, 8, 5, 8, 9, 4, 10, 11, 8, 12, 13, 8, 12, 14, 4, 15, 16, 11, 8, 17, 12, 11, 18, 8, 19, 20, 14, 21, 22, 15, 20, 23, 11, 8, 24, 17, 25
Offset: 0

Views

Author

Vladimir Shevelev, May 19 2009

Keywords

Comments

a(n)>=a((f(2n+1)-1)/2), where f is defined as in A159885. E.g., for n=4, we have a(4)=3>a(((9*3+1)/4-1)/2)=a(3)=2.

Examples

			Put a(0)=0. According to example to A160348, in the first series we find A160348(1) and A160348(2), therefore a(1)=a(2)=1. In the second series we find A160348(3), A160348(5), A160348(6) and A160348(8), thus a(3)=a(5)=a(6)=a(8)=2.
		

Crossrefs

Showing 1-9 of 9 results.