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.

A275866 Number of semiprimes in {n, f(n), f(f(n)), ...., 1}, where f is the Collatz function.

Original entry on oeis.org

0, 0, 2, 1, 1, 3, 5, 1, 7, 2, 4, 3, 2, 6, 6, 1, 3, 7, 6, 2, 2, 5, 4, 3, 8, 3, 38, 6, 5, 6, 36, 1, 9, 4, 4, 7, 6, 7, 12, 2, 37, 2, 9, 5, 4, 5, 35, 3, 8, 8, 8, 3, 2, 38, 38, 6, 11, 6, 10, 6, 5, 37, 36, 1, 9, 9, 8, 4, 4, 4, 34, 7, 38, 7, 3, 7, 7, 12, 11, 2, 6, 38
Offset: 1

Views

Author

Michel Lagneau, Aug 11 2016

Keywords

Comments

Number of semiprimes in the trajectory of n under the 3x+1 map (i.e. the number of semiprimes until the trajectory reaches 1).
It seems that about 15% of the terms satisfy a(i) = a(i+1). For example, up to 100000, 15140 terms satisfy this condition.

Examples

			a(9)=7 because the trajectory of 9 is 9 -> 28 -> 14 -> 7 -> 22 -> 11 -> 34 -> 17 -> 52 -> 26 -> 13 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 and the 7 semiprimes of this trajectory are 9, 14, 22, 34, 26, 10 and 4.
		

Crossrefs

Programs

  • Mathematica
    Table[Count[NestWhileList[If[EvenQ@ #, #/2, 3 # + 1] &, n, # != 1 &], k_ /; PrimeOmega@ k == 2], {n, 82}] (* Michael De Vlieger, Aug 11 2016 *)
  • PARI
    print1(0, ", ");for(n=2, 100, s=n; t=0; while(s!=1, if(bigomega(s)==2 , t=t+1, t=t); if(s%2==0, s=s/2, s=(3*s+1)); if(s==1, print1(t", "))))