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

A115775 Sequence A115774 in binary.

Original entry on oeis.org

0, 101, 1010, 10100, 10101, 101000, 101010, 1010000, 1010100, 1010101, 10100000, 10101000, 10101010, 101000000, 101010000, 101010100, 101010101, 1010000000, 1010000101, 1010100000, 1010101000, 1010101010, 10100000000
Offset: 0

Views

Author

Antti Karttunen, Jan 30 2006

Keywords

Crossrefs

Cf. a(n) = A007088(A115774(n)).

A062052 Numbers with exactly 2 odd integers in their Collatz (or 3x+1) trajectory.

Original entry on oeis.org

5, 10, 20, 21, 40, 42, 80, 84, 85, 160, 168, 170, 320, 336, 340, 341, 640, 672, 680, 682, 1280, 1344, 1360, 1364, 1365, 2560, 2688, 2720, 2728, 2730, 5120, 5376, 5440, 5456, 5460, 5461, 10240, 10752, 10880, 10912, 10920, 10922, 20480, 21504, 21760, 21824
Offset: 1

Views

Author

Keywords

Comments

The Collatz (or 3x+1) function is f(x) = x/2 if x is even, 3x+1 if x is odd.
The Collatz trajectory of n is obtained by applying f repeatedly to n until 1 is reached.
The sequence consists of terms of A002450 and their 2^k multiples. The first odd integer in the trajectory is one of the terms of A002450 and the second odd one is the terminal 1. - Antti Karttunen, Feb 21 2006
This sequence looks to appear first in the literature on page 1285 in R. E. Crandall.

Examples

			The Collatz trajectory of 5 is (5,16,8,4,2,1), which contains 2 odd integers.
		

Crossrefs

Is this a subset of A115774?
Column k=2 of A354236.

Programs

  • Haskell
    import Data.List (elemIndices)
    a062052 n = a062052_list !! (n-1)
    a062052_list = map (+ 1) $ elemIndices 2 a078719_list
    -- Reinhard Zumkeller, Oct 08 2011
    
  • Mathematica
    Collatz[n_] := NestWhileList[If[EvenQ[#], #/2, 3 # + 1] &, n, # > 1 &]; countOdd[lst_] := Length[Select[lst, OddQ]]; Select[Range[22000], countOdd[Collatz[#]] == 2 &] (* T. D. Noe, Dec 03 2012 *)
  • PARI
    for(n=2,100000,s=n; t=0; while(s!=1,if(s%2==0,s=s/2,s=3*s+1; t++); if(s*t==1,print1(n,","); ); ))
    
  • Python
    def a(n):
        l=[n, ]
        while True:
            if n%2==0: n//=2
            else: n = 3*n + 1
            if n not in l:
                l.append(n)
                if n<2: break
            else: break
        return len([i for i in l if i % 2])
    print([n for n in range(1, 22001) if a(n)==2]) # Indranil Ghosh, Apr 14 2017

Formula

A078719(a(n)) = 2; A006667(a(n)) = 1.
a(n) = 2^x * (4^y - 1)/3 where x = A122196(n) - 1 and y = A122197(n) + 1. - Alan Michael Gómez Calderón, Jan 16 2025 after Antti Karttunen

A115772 Integers i such that 13*i = A048720bi(21,i).

Original entry on oeis.org

0, 5, 10, 15, 20, 21, 30, 31, 40, 42, 45, 47, 60, 61, 62, 63, 80, 84, 85, 90, 94, 95, 120, 122, 124, 125, 126, 127, 160, 165, 168, 170, 173, 175, 180, 181, 188, 189, 190, 191, 240, 244, 245, 248, 250, 252, 253, 254, 255, 320, 330, 336, 340, 341, 346, 350, 351
Offset: 0

Views

Author

Antti Karttunen, Jan 30 2006

Keywords

Comments

Here * stands for ordinary multiplication and A048720 is the carryless (GF(2)[X]) multiplication.
a(n) appears to be the set of all n that can be expressed as x OR 4x for the bitwise OR operation. [From Gary Detlefs Dec 20 2010]

Crossrefs

Row 13 of A115872. Cf. A048717, A115767, A115770. Superset of A115774 ? A115776 gives the terms which are not in A115774. A115773 shows this sequence in binary.

A115770 Integers i such that 7*i = A048720bi(11, i), where A048720bi implements the dyadic function given in A048720 (see A001317).

Original entry on oeis.org

0, 7, 14, 15, 28, 30, 31, 56, 60, 62, 63, 112, 120, 124, 126, 127, 224, 240, 248, 252, 254, 255, 448, 455, 480, 496, 504, 508, 510, 511, 896, 903, 910, 911, 960, 967, 992, 1008, 1016, 1020, 1022, 1023, 1792, 1799, 1806, 1807, 1820, 1822, 1823, 1920
Offset: 0

Views

Author

Antti Karttunen, Jan 30 2006

Keywords

Comments

Here * stands for ordinary multiplication and A048720 is the carryless (GF(2)[X]) multiplication.

Crossrefs

Row 7 of A115872 (conjecture: also row 5).
A115771 shows this sequence in binary.

A115776 Integers i such that 13*i = A048720bi(21,i), but 15*i <> A048720bi(23,i).

Original entry on oeis.org

15, 30, 31, 45, 47, 60, 61, 62, 63, 90, 94, 95, 120, 122, 124, 125, 126, 127, 165, 173, 175, 180, 181, 188, 189, 190, 191, 240, 244, 245, 248, 250, 252, 253, 254, 255, 330, 346, 350, 351, 360, 362, 376, 378, 380, 381, 382, 383, 480, 488, 490, 496, 500
Offset: 1

Views

Author

Antti Karttunen, Jan 30 2006

Keywords

Comments

Here * stands for ordinary multiplication and A048720 is the carryless (GF(2)[X]) multiplication.

Crossrefs

Cf. Setwise difference of A115772 and A115774. A115781 shows this sequence in binary.
Showing 1-5 of 5 results.