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.

A272985 Numbers n such that the elements of the Collatz trajectory of n are exactly the same as the divisors of n.

Original entry on oeis.org

1, 2, 4, 8, 16, 32, 64, 80, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072, 262144, 524288, 1048576, 2097152, 4194304, 8388608, 16777216, 33554432, 67108864, 134217728, 268435456, 536870912, 1073741824, 2147483648, 4294967296, 8589934592
Offset: 1

Views

Author

Michel Lagneau, May 12 2016

Keywords

Comments

The number 80 is probably the unique non-power of 2 in the sequence.

Examples

			80 is in the sequence because 80 -> 40 -> 20 -> 10 -> 5 -> 16 -> 8 -> 4 -> 2 -> 1 with 9 iterations and the divisors of 80 are 1, 2, 4, 5, 8, 10, 16, 20, 40, 80.
		

Crossrefs

Programs

  • Maple
    with(numtheory):nn:=10000:
      for n from 1 to nn do:
        m:=n:it:=0:lst:={n}:
          for i from 1 to nn while(m<>1) do:
            if irem(m,2)=0
             then
             m:=m/2:
             else
             m:=3*m+1:
            fi:
           it:=it+1:lst:=lst union {m}:
          od:
           x:=divisors(n):n0:=nops(x):lst1:={op(x),x[n0]}:
           lst2:=lst intersect lst1:n1:=nops(lst2):
           if it+1=n1 and n0=n1
           then
           print(n):
           else fi:
         od: