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.

User: Hamid Kulosman

Hamid Kulosman's wiki page.

Hamid Kulosman has authored 4 sequences.

A334226 a(n) is the number of times that the number 3*k+1 from the Collatz trajectory of n is greater than n.

Original entry on oeis.org

0, 0, 2, 0, 1, 2, 5, 0, 6, 1, 4, 1, 2, 5, 5, 0, 2, 5, 5, 0, 1, 3, 3, 0, 6, 1, 40, 3, 4, 4, 38, 0, 7, 2, 2, 2, 3, 4, 9, 0, 39, 1, 5, 1, 2, 3, 37, 0, 3, 4, 4, 0, 1, 40, 40, 0, 5, 1, 5, 3, 4, 38, 38, 0, 3, 3, 3, 0, 1, 2, 35, 0, 40, 1, 3, 1, 2, 6, 6, 0, 4, 38, 38, 0, 1, 4, 4, 0, 3, 1, 31, 2, 3, 36, 36, 0, 41, 2, 2, 0
Offset: 1

Author

Hamid Kulosman, May 11 2020

Keywords

Comments

The Collatz trajectory of the number n is a sequence starting with n and ending with 1 (obtained for the first time), constructed using even steps k to k/2 and odd steps k to 3*k+1. a(n) is the number of times in the Collatz trajectory of n that the number 3*k+1, obtained after the odd step k to 3*k+1, is greater than n. Alternatively, a(n) represents the number of odd terms in the Collatz trajectory of n that are greater than (n-1)/3. a(1)=0 since the Collatz trajectory of 1 has no steps.

Examples

			The Collatz trajectory of n=3 is 3, (10), 5, (16), 8, 4, 2, 1. It happens twice that the number 3*k+1 in this process is greater than n (those numbers 3*k+1 are in parentheses), so a(3)=2.
		

Crossrefs

Cf. A006667.

Programs

  • Mathematica
    a[n_] := Block[{c = NestWhileList[ If[ EvenQ@ #, #/2, 3 # + 1] &, n, #>1 & ]}, Length@ Select[ Range[2, Length[c]], OddQ[c[[# - 1]]] && c[[#]] > n &]]; Array[a, 90] (* Giovanni Resta, May 19 2020 *)
  • PARI
    a(n) = my(res=0, cn=n); while(n>1, if(bitand(n,1), n=3*n+1; if(n>cn, res++);, n>>=1)); res \\ David A. Corneth, May 20 2020

Formula

a(n) <= A006667(n). - David A. Corneth, May 20 2020

Extensions

More terms from Giovanni Resta, May 19 2020

A334040 Number of odd numbers larger than n in the Collatz trajectory of n.

Original entry on oeis.org

0, 0, 1, 0, 0, 0, 3, 0, 3, 0, 2, 0, 0, 1, 3, 0, 0, 0, 1, 0, 0, 0, 2, 0, 1, 0, 38, 0, 0, 2, 36, 0, 0, 0, 1, 0, 0, 0, 4, 0, 35, 0, 2, 0, 0, 1, 34, 0, 0, 0, 1, 0, 0, 33, 35, 0, 1, 0, 3, 0, 0, 32, 33, 0, 0, 0, 1, 0, 0, 0, 31, 0, 33, 0, 2, 0, 0, 2, 4, 0, 0, 31, 32
Offset: 1

Author

Hamid Kulosman, May 11 2020

Keywords

Examples

			For n=7 the Collatz process is: 7,22,(11),34,(17),52,26,(13),40,20,10,5,16,8,4,2,1. The numbers in the parentheses are odd numbers in the Collatz process for n=7 that are bigger than 7. There are three of them, hence a(7)=3.
		

Crossrefs

Programs

A323735 a(n) is the largest minimal distance of a binary LCD [n,2] code.

Original entry on oeis.org

1, 2, 2, 2, 3, 4, 5, 6, 6, 6, 7, 8, 9, 10, 10, 10, 11, 12, 13, 14, 14, 14, 15, 16, 17, 18, 18, 18, 19, 20, 21, 22, 22, 22, 23, 24, 25, 26, 26, 26, 27, 28, 29, 30, 30, 30, 31, 32, 33, 34, 34, 34, 35, 36, 37, 38, 38, 38, 39, 40, 41, 42, 42, 42, 43, 44, 45, 46, 46, 46
Offset: 2

Author

Hamid Kulosman, Aug 31 2019

Keywords

Comments

See Dougherty link for a definition of LCD code.

Examples

			For n = 2, a(n) = 1 since the largest minimal distance of a binary LCD [2,2] code is 1.
		

Programs

  • Mathematica
    CoefficientList[Series[(1 + x^4)/((1 - x)^2*(1 - x + x^2) (1 + x + x^2)), {x, 0, 60}], x] (* Michael De Vlieger, Sep 29 2019 *)
  • PARI
    a(n)={my(r=(n-3)\6, s=3+(n-3)%6); 4*r + floor(s/6)*(1 + s%6) + 2} \\ Andrew Howroyd, Aug 31 2019
    
  • PARI
    Vec(x^2*(1 + x^4) / ((1 - x)^2*(1 - x + x^2)*(1 + x + x^2)) + O(x^80)) \\ Colin Barker, Sep 01 2019

Formula

a(n) = 4*r + floor(s/6)*(1 + (s mod 6)) + 2, where n = 6*r + s, r is an integer and 3 <= s <= 8.
a(n) = 4 + a(n-6) for n > 7.
a(n) = (12*n - 12 - 9*cos(n*Pi/3) + 3*cos(2*n*Pi/3) + 3*sqrt(3)*sin(n*Pi/3) + sqrt(3)*sin(2*n*Pi/3))/18. - Wesley Ivan Hurt, Aug 31 2019
From Colin Barker, Sep 01 2019: (Start)
G.f.: x^2*(1 + x^4) / ((1 - x)^2*(1 - x + x^2)*(1 + x + x^2)).
a(n) = 2*a(n-1) - 2*a(n-2) + 2*a(n-3) - 2*a(n-4) + 2*a(n-5) - a(n-6) for n>7.
(End)
E.g.f.: 1+(1/18)*exp(-x/2)*(12*exp(3*x/2)*(-1+x)+(3-9*exp(x))*cos(sqrt(3)*x/2)*sqrt(3)*(1+3*exp(x))*sin(sqrt(3)*x/2)). - Stefano Spezia, Sep 04 2019

A202479 The number of equivalence classes of the set {1,2,...,n} under the equivalence relation x ~ y iff lcm(x,n) = lcm(y,n).

Original entry on oeis.org

1, 1, 2, 2, 4, 3, 6, 4, 6, 6, 10, 6, 12, 9, 9, 8, 16, 9, 18, 10, 14, 15, 22, 10, 20, 18, 18, 15, 28, 15, 30, 16, 23, 24, 25, 16, 36, 27, 28, 19, 40, 21, 42, 25, 26, 33, 46, 20, 42, 30, 37, 30, 52, 27, 42, 28, 42, 42, 58, 23, 60, 45, 39, 32, 50, 35, 66, 40, 51
Offset: 1

Author

Hamid Kulosman, Dec 19 2011

Keywords

Programs

  • Mathematica
    a[n_] := Length @ Union @ Table[LCM[n, i], {i, 1, n}]; Array[a, 100] (* Amiram Eldar, Apr 23 2020 *)
  • PARI
    a(n)=#Set(vector(n,i,lcm(n,i))) \\ Charles R Greathouse IV, Dec 19 2011

Formula

h(n) = symb floor(prod_{i=1..k} (p_i^a_i - p_i^(a_i-1) + 1/p_i), where n=p_1^a_1 * ... * p_k^a_k and the symbol symb symbolizes that first the multiplication of all factors is performed and then floor is assigned to each of the 3^k terms, keeping the sign of the term outside (this symbol is occurring in W. Sierpinski's 1950 monograph Number Theory).