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

A347668 Indices of records in A347409.

Original entry on oeis.org

1, 2, 3, 15, 21, 75, 151, 1365, 5461, 7407, 14563, 87381, 184111, 932067, 5592405, 13256071, 26512143, 357913941, 1431655765, 3817748707, 22906492245, 91625968981, 244335917283, 1466015503701, 5212499568715, 10424999137431, 93824992236885
Offset: 1

Views

Author

Paolo Xausa, Sep 10 2021

Keywords

Comments

Conjecture 1: A347409(a(n)) is even for n >= 11. Conjecture 2: all even numbers > 2 appear as A347409(a(n)) for some n. - Chai Wah Wu, Sep 29 2021
If conjectures 1 and 2 are true, then A347409(a(n)) = 2n - 6 for n >= 11, and hence a(n) <= (4^(n-3)-1)/3 for n >= 11 since A347409((4^(n-3)-1)/3) = 2n - 6. - Charles R Greathouse IV, Oct 25 2022

Crossrefs

Programs

  • Mathematica
    A347409[n_]:=(c=n;sm=0;While[c>1,If[OddQ[c],c=3c+1,If[(s=IntegerExponent[c,2])>sm,sm=s];c/=2^s]];sm)
    upto=100000;a={};rec=-1;Do[If[(r=A347409[i])>rec,rec=r;AppendTo[a,i]],{i,upto}];a
  • PARI
    f(n)=my(nb=0); while (n != 1, if (n % 2, n=3*n+1, my(x = valuation(n, 2)); n /= 2^x; nb = max(nb, x)); ); nb; \\ A347409
    lista(nn) = my(r=-1, m); for (n=1, nn, if ((m=f(n)) > r, print1(n, ", "); r = m);); \\ Michel Marcus, Sep 10 2021

Extensions

a(15) from Michel Marcus, Sep 10 2021
a(16)-a(17) from Alois P. Heinz, Sep 10 2021
a(18)-a(20) from Michael S. Branicky, Sep 28 2021
a(21)-a(22) from Michael S. Branicky, Sep 30 2021
a(23) from Michael S. Branicky, Oct 04 2021
a(24)-a(27) from Kevin P. Thompson, Apr 14 2022

A347669 Indices of first occurrences of n in A347409.

Original entry on oeis.org

1, 2, 4, 8, 3, 15, 21, 128, 75, 512, 151, 2048, 1365, 8192, 5461, 7407, 14563, 131072, 87381, 524288, 184111, 2097152, 932067, 6213783, 5592405, 33554432, 13256071, 134217728, 26512143, 530242875, 357913941, 1899273247, 1431655765, 8589934592, 3817748707, 34359738368
Offset: 0

Views

Author

Paolo Xausa, Sep 10 2021

Keywords

Examples

			a(5) = 15 because 5 occurs for the first time at position 15 in A347409.
		

Crossrefs

Programs

  • Mathematica
    A347409[n_]:=A347409[n]=(c=n;sm=0;While[c>1,If[OddQ[c],c=3c+1,If[(s=IntegerExponent[c,2])>sm,sm=s];c/=2^s]];sm)
    nterms=20;Table[i=0;While[A347409[++i]!=n];i,{n,0,nterms-1}]
  • PARI
    f(n) = {my(nb=0); while (n != 1, if (n % 2, n=3*n+1, my(x = valuation(n, 2)); n /= 2^x; nb = max(nb, x)); ); nb; } \\ A347409
    a(n) = my(k=1); while (f(k) != n, k++); k; \\ Michel Marcus, Sep 10 2021

Extensions

a(21)-a(22) from Michel Marcus, Sep 10 2021
a(23)-a(28) from Alois P. Heinz, Sep 11 2021
a(29)-a(34) from Michael S. Branicky, Sep 28 2021
a(35) from Chai Wah Wu, Oct 02 2021

A348007 Starting value of the longest run of halving steps in the trajectory from n to 1 in the Collatz map (or 3x+1 problem), or -1 if no such trajectory exists.

Original entry on oeis.org

2, 16, 4, 16, 16, 16, 8, 16, 16, 16, 16, 16, 16, 160, 16, 16, 16, 16, 16, 64, 16, 160, 16, 16, 16, 160, 16, 16, 160, 160, 32, 16, 16, 160, 16, 112, 16, 304, 16, 160, 64, 112, 16, 16, 160, 160, 48, 112, 16, 16, 16, 160, 160, 160, 16, 112, 16, 304, 160, 160, 160
Offset: 2

Views

Author

Paolo Xausa, Sep 24 2021

Keywords

Comments

In case of ties (two or more longest runs of same length), the highest starting value is picked. The first n for which the longest run of halving steps occurs at two different subtrajectories is 37, where the Collatz map contains the 4-step subtrajectories 112 -> 56 -> 28 -> 14 > 7 and 16 -> 8 -> 4 -> 2 -> 1. a(37) is therefore 112 (highest starting value).
If the Collatz conjecture (i.e., all trajectories reach 1) is true then, except for n = 2, 4 and 8, a(n) mod 16 = 0, since all trajectories contain (at least) 4 consecutive halvings.

Examples

			a(2) = 2 because the Collatz trajectory from 2 to 1 is simply 2 -> 1 (one halving step, starting at 2).
a(3) = 16 because the trajectory from 3 to 1 is 3 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1. Here, the longest halving run is the 4-step subtrajectory 16 -> 8 -> 4 -> 2 -> 1, which starts at 16.
a(15) = 160 because the longest halving run in the trajectory from 15 to 1 (the 5-step subtrajectory 160 -> 80 -> 40 -> 20 -> 10 -> 5) starts at 160.
		

Crossrefs

Programs

  • Mathematica
    nterms=100;Table[c=n;cm=sm=0;While[c>1,If[OddQ[c],c=3c+1,s=IntegerExponent[c,2];If[s>sm,sm=s;cm=c,If[s==sm,cm=Max[cm,c]]];c/=2^s]];cm,{n,2,nterms+1}]
  • PARI
    A348007(n) = { my(m2v=valuation(n,2), mx=n, t); while(n>1, if((t=valuation(n,2))>m2v, m2v=t; mx=n, if(t==m2v && n>mx, mx=n)); if(!(n%2),n/=2,n+=(n+n+1))); (mx); }; \\ Antti Karttunen, Oct 13 2021

Formula

a(2^k) = 2^k, for integers k >= 1.
a(n) mod 2^A347409(n) = 0.

A350369 a(n) is the length of the longest sequence of consecutive tripling steps in the Collatz (3x+1) sequence beginning at n.

Original entry on oeis.org

0, 0, 2, 0, 1, 2, 3, 0, 3, 1, 2, 2, 1, 3, 4, 0, 1, 3, 2, 1, 1, 2, 3, 2, 2, 1, 6, 3, 2, 4, 6, 0, 2, 1, 2, 3, 3, 2, 3, 1, 6, 1, 3, 2, 1, 3, 6, 2, 3, 2, 2, 1, 1, 6, 6, 3, 3, 2, 2, 4, 3, 6, 6, 0, 3, 2, 2, 1, 1, 2, 6, 3, 6, 3, 2, 2, 2, 3, 4, 1, 3, 6, 6, 1, 1, 3, 3
Offset: 1

Views

Author

Kevin P. Thompson, Dec 27 2021

Keywords

Comments

"Consecutive tripling steps" are repeated (3x+1)/2 operations that are not interrupted by a second division by 2.
This sequence attempts to measure the largest upward thrust in each Collatz sequence and so is correlated to some degree with the maximum value (A025586) and length (A006577) of Collatz sequences.
If n = 2^x * (2^y*z - 1), then a(n) >= y. - Charles R Greathouse IV, Oct 25 2022

Examples

			The Collatz sequence for n=7 has a streak of 3 consecutive tripling steps (at 7, 11, and 17), so a(7) = 3.
7, 22, 11, 34, 17, 52, 26, 13, 40, 20, 10, 5, 16, 8, 4, 2, 1
^      ^       ^
		

Crossrefs

Programs

  • PARI
    a(n)=my(c,r); n>>=valuation(n,2); while(n>1, n+=(n+1)/2; if(n%2, c++, r=max(r,c+1); n>>=valuation(n,2); c=0)); max(r,c) \\ Charles R Greathouse IV, Oct 25 2022
Showing 1-4 of 4 results.