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.

A060142 Ordered set S defined by these rules: 0 is in S and if x is in S then 2x+1 and 4x are in S.

Original entry on oeis.org

0, 1, 3, 4, 7, 9, 12, 15, 16, 19, 25, 28, 31, 33, 36, 39, 48, 51, 57, 60, 63, 64, 67, 73, 76, 79, 97, 100, 103, 112, 115, 121, 124, 127, 129, 132, 135, 144, 147, 153, 156, 159, 192, 195, 201, 204, 207, 225, 228, 231, 240, 243, 249, 252, 255, 256, 259, 265, 268, 271
Offset: 0

Views

Author

Clark Kimberling, Mar 05 2001

Keywords

Comments

After expelling 0 and 1, the numbers 4x occupy same positions in S that 1 occupies in the infinite Fibonacci word (A003849).
a(A026351(n)) = A219608(n); a(A004957(n)) = 4 * a(n). - Reinhard Zumkeller, Nov 26 2012
Apart from the initial term, this lists the indices of the 1's in A086747. - N. J. A. Sloane, Dec 05 2019
From Gus Wiseman, Jun 10 2020: (Start)
Numbers k such that the k-th composition in standard order has all odd parts, or numbers k such that A124758(k) is odd. The k-th composition in standard order (graded reverse-lexicographic, A066099) is obtained by taking the set of positions of 1's in the reversed binary expansion of k, prepending 0, taking first differences, and reversing again. For example, the sequence of all compositions into odd parts begins:
0: () 57: (1,1,3,1) 135: (5,1,1,1)
1: (1) 60: (1,1,1,3) 144: (3,5)
3: (1,1) 63: (1,1,1,1,1,1) 147: (3,3,1,1)
4: (3) 64: (7) 153: (3,1,3,1)
7: (1,1,1) 67: (5,1,1) 156: (3,1,1,3)
9: (3,1) 73: (3,3,1) 159: (3,1,1,1,1,1)
12: (1,3) 76: (3,1,3) 192: (1,7)
15: (1,1,1,1) 79: (3,1,1,1,1) 195: (1,5,1,1)
16: (5) 97: (1,5,1) 201: (1,3,3,1)
19: (3,1,1) 100: (1,3,3) 204: (1,3,1,3)
25: (1,3,1) 103: (1,3,1,1,1) 207: (1,3,1,1,1,1)
28: (1,1,3) 112: (1,1,5) 225: (1,1,5,1)
31: (1,1,1,1,1) 115: (1,1,3,1,1) 228: (1,1,3,3)
33: (5,1) 121: (1,1,1,3,1) 231: (1,1,3,1,1,1)
36: (3,3) 124: (1,1,1,1,3) 240: (1,1,1,5)
39: (3,1,1,1) 127: (1,1,1,1,1,1,1) 243: (1,1,1,3,1,1)
48: (1,5) 129: (7,1) 249: (1,1,1,1,3,1)
51: (1,3,1,1) 132: (5,3) 252: (1,1,1,1,1,3)
(End)
Numbers whose binary representation has the property that every run of consecutive 0's has even length. - Harry Richman, Jan 31 2024

Examples

			From _Harry Richman_, Jan 31 2024: (Start)
In the following, dots are used for zeros in the binary representation:
   n  binary(a(n))  a(n)
   0:    .......     0
   1:    ......1     1
   2:    .....11     3
   3:    ....1..     4
   4:    ....111     7
   5:    ...1..1     9
   6:    ...11..    12
   7:    ...1111    15
   8:    ..1....    16
   9:    ..1..11    19
  10:    ..11..1    25
  11:    ..111..    28
  12:    ..11111    31
  13:    .1....1    33
  14:    .1..1..    36
  15:    .1..111    39
  16:    .11....    48
  17:    .11..11    51
  18:    .111..1    57
  19:    .1111..    60
  20:    .111111    63
  21:    1......    64
  22:    1....11    67
(End)
		

Crossrefs

Cf. A003714 (no consecutive 1's in binary expansion).
Odd partitions are counted by A000009.
Numbers with an odd number of 1's in binary expansion are A000069.
Numbers whose binary expansion has odd length are A053738.
All of the following pertain to compositions in standard order (A066099):
- Length is A000120.
- Compositions without odd parts are A062880.
- Sum is A070939.
- Product is A124758.
- Strict compositions are A233564.
- Heinz number is A333219.
- Number of distinct parts is A334028.

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a060142 n = a060142_list !! n
    a060142_list = 0 : f (singleton 1) where
       f s = x : f (insert (4 * x) $ insert (2 * x + 1) s') where
           (x, s') = deleteFindMin s
    -- Reinhard Zumkeller, Nov 26 2012
    
  • Mathematica
    Take[Nest[Union[Flatten[# /. {{i_Integer -> i}, {i_Integer -> 2 i + 1}, {i_Integer -> 4 i}}]] &, {1}, 5], 32]  (* Or *)
    Select[Range[124], FreeQ[Length /@ Select[Split[IntegerDigits[#, 2]], First[#] == 0 &], ?OddQ] &] (* _Birkas Gyorgy, May 29 2012 *)
  • PARI
    is(n)=if(n<3, n<2, if(n%2,is(n\2),n%4==0 && is(n/4))) \\ Charles R Greathouse IV, Oct 21 2013

Extensions

Corrected by T. D. Noe, Nov 01 2006
Definition simplified by Charles R Greathouse IV, Oct 21 2013

A060140 Ordered set S defined by these rules: 0 and 1 are in S and if x is a nonzero number in S, then 3x and 9x+1 are in S.

Original entry on oeis.org

0, 1, 3, 9, 10, 27, 28, 30, 81, 82, 84, 90, 91, 243, 244, 246, 252, 253, 270, 271, 273, 729, 730, 732, 738, 739, 756, 757, 759, 810, 811, 813, 819, 820, 2187, 2188, 2190, 2196, 2197, 2214, 2215, 2217, 2268, 2269, 2271, 2277, 2278, 2430, 2431, 2433, 2439
Offset: 0

Views

Author

Clark Kimberling, Mar 05 2001

Keywords

Comments

The numbers of the form 9x+1 occupy the same positions in S that 1 occupies in the infinite Fibonacci word (A003849).
These are Fibternary numbers: numbers whose ternary representations consist only of zeros and ones and do not have two consecutive ones. The sequence of Fibternary numbers can be constructed by writing out the Zeckendorf representations of nonnegative integers and then evaluating the result in ternary. These numbers are similar to Fibbinary numbers A003714, Tribbinary numbers A060140, and Tribternary numbers A356823. The number of Fibternary numbers less than any power of three is a Fibonacci number. We can generate Fibternary numbers recursively: Start by adding 0 and 1 to the sequence. Then, if x is a number in the sequence add 3x and 9x+1 to the sequence. Every nonnegative integer can be written as the sum of four Fibternary numbers. Every number has a Fibternary multiple. - Tanya Khovanova and PRIMES STEP Senior group, Aug 30 2022

Crossrefs

Programs

  • Mathematica
    FromDigits[IntegerDigits[#, 2], 3] & /@ Select[Range[0, 165], BitAnd[#, 2*#] == 0 &] (* Amiram Eldar, Oct 28 2023 *)
  • Python
    import heapq
    from itertools import islice
    def agen(): # generator of terms, using recursion in Comments
        yield 0; x, h = None, [1]
        while True:
            x = heapq.heappop(h)
            yield x
            for t in [3*x, 9*x+1]:  heapq.heappush(h, t)
    print(list(islice(agen(), 51))) # Michael S. Branicky, Aug 30 2022
    
  • Python
    def A060140(n):
        tlist, s = [1,2], 0
        while tlist[-1]+tlist[-2] <= n:
            tlist.append(tlist[-1]+tlist[-2])
        for d in tlist[::-1]:
            s <<= 1
            if d <= n:
                s += 1
                n -= d
        return int(bin(s)[2:],3) # Chai Wah Wu, May 22 2025

Formula

a(n) = A005836(A003714(n)+1). - Amiram Eldar, Oct 28 2023

A060139 Ordered set S defined by these rules: 0 and 1 are in S and if x is a nonzero number in S, then 3x-1 and 9x are in S.

Original entry on oeis.org

0, 1, 2, 5, 9, 14, 18, 26, 41, 45, 53, 77, 81, 122, 126, 134, 158, 162, 230, 234, 242, 365, 369, 377, 401, 405, 473, 477, 485, 689, 693, 701, 725, 729, 1094, 1098, 1106, 1130, 1134, 1202, 1206, 1214, 1418, 1422, 1430, 1454, 1458, 2066, 2070, 2078, 2102, 2106
Offset: 0

Views

Author

Clark Kimberling, Mar 05 2001

Keywords

Comments

The numbers 1 and 9x occupy same positions in S that 1 occupies in the infinite Fibonacci word (A003849).

Crossrefs

A060141 Ordered set S defined by these rules: 0 and 1 are in S and if x is a nonzero number in S, then 3x and 9x+2 are in S.

Original entry on oeis.org

0, 1, 3, 9, 11, 27, 29, 33, 81, 83, 87, 99, 101, 243, 245, 249, 261, 263, 297, 299, 303, 729, 731, 735, 747, 749, 783, 785, 789, 891, 893, 897, 909, 911, 2187, 2189, 2193, 2205, 2207, 2241, 2243, 2247, 2349, 2351, 2355, 2367, 2369, 2673, 2675, 2679, 2691
Offset: 0

Views

Author

Clark Kimberling, Mar 05 2001

Keywords

Comments

The numbers of the form 9x+1 occupy the same positions in S that 1 occupies in the infinite Fibonacci word (A003849).

Crossrefs

A327616 Irregular table read by rows; the first row contains a single 1; for any n > 1, row n+1 corresponds to the ordinal transform of the terms in rows 1..n.

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 3, 1, 1, 2, 3, 1, 4, 2, 1, 5, 1, 2, 3, 1, 4, 2, 1, 5, 6, 3, 2, 7, 1, 4, 8, 1, 1, 2, 3, 1, 4, 2, 1, 5, 6, 3, 2, 7, 1, 4, 8, 1, 9, 5, 3, 10, 2, 6, 11, 2, 1, 4, 7, 1, 12, 3, 1, 13, 1, 2, 3, 1, 4, 2, 1, 5, 6, 3, 2, 7, 1, 4, 8, 1, 9, 5, 3, 10, 2
Offset: 1

Views

Author

Rémy Sigrist, Jul 06 2020

Keywords

Comments

The ordinal transform of a sequence b(n) is the sequence t(n) = number of values in b(1), ..., b(n) which are equal to b(n).

Examples

			Triangle begins:
  1:  [1]
  2:  [1]
  3:  [1, 2]
  4:  [1, 2, 3, 1]
  5:  [1, 2, 3, 1, 4, 2, 1, 5]
  6:  [1, 2, 3, 1, 4, 2, 1, 5, 6, 3, 2, 7, 1, 4, 8, 1]
		

Crossrefs

Cf. A000045, A011782 (row lengths), A048297, A060138, A107946.

Programs

  • PARI
    { for (n=1, #a=vector(85), print1 (a[n]=if (n==1, a[n]=1, a[n]=o[a[k++]]++)", "); if (hammingweight(n)==1, k=0; o=vector(vecmax(a[1..n])))) }

Formula

Apparently:
- the greatest term in row n is A000045(n),
- a(n) = 1 iff n = 1 or n belongs to A060138,
- a(A048297(n+1)) = n (and this corresponds to the first occurrence of n),
- a(4^k) = A000045(2*k+1) for any k >= 0,
- a(2*4^k-1) = A000045(2*k+2) for any k >= 0.
Showing 1-5 of 5 results.