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

A333492 Position of first appearance of n in A271410 (LCM of binary indices).

Original entry on oeis.org

1, 2, 4, 8, 16, 6, 64, 128, 256, 18, 1024, 12, 4096, 66, 20, 32768, 65536, 258, 262144, 24, 68, 1026, 4194304, 132, 16777216, 4098, 67108864, 72, 268435456, 22, 1073741824, 2147483648, 1028, 65538, 80, 264, 68719476736, 262146, 4100, 144, 1099511627776, 70, 4398046511104
Offset: 1

Views

Author

Gus Wiseman, Mar 28 2020

Keywords

Comments

A binary index of n is any position of a 1 in its reversed binary expansion. The binary indices of n are row n of A048793.

Examples

			The sequence together with the corresponding binary expansions and binary indices begins:
      1:                 1 ~ {1}
      2:                10 ~ {2}
      4:               100 ~ {3}
      8:              1000 ~ {4}
     16:             10000 ~ {5}
      6:               110 ~ {2,3}
     64:           1000000 ~ {7}
    128:          10000000 ~ {8}
    256:         100000000 ~ {9}
     18:             10010 ~ {2,5}
   1024:       10000000000 ~ {11}
     12:              1100 ~ {3,4}
   4096:     1000000000000 ~ {13}
     66:           1000010 ~ {2,7}
     20:             10100 ~ {3,5}
  32768:  1000000000000000 ~ {16}
  65536: 10000000000000000 ~ {17}
    258:         100000010 ~ {2,9}
		

Crossrefs

The version for prime indices is A330225.
The version for standard compositions is A333225.
Let q(k) be the binary indices of k:
- The sum of q(k) is A029931(k).
- The elements of q(k) are row k of A048793.
- The product of q(k) is A096111(k).
- The LCM of q(k) is A271410(k).
- The GCD of q(k) is A326674(k).
GCD of prime indices is A289508.
LCM of prime indices is A290103.
LCM of standard compositions is A333226.

Programs

  • Mathematica
    bpe[n_]:=Join@@Position[Reverse[IntegerDigits[n,2]],1];
    q=Table[LCM@@bpe[n],{n,10000}];
    Table[Position[q,i][[1,1]],{i,First[Split[Union[q],#1+1==#2&]]}]

Extensions

Terms a(23) and beyond from Giovanni Resta, Mar 29 2020

A271984 Numbers n such that the denominator of the sum of the reciprocals of the exponents in the binary expansion of 2n is not equal to their LCM. That is, A271410(n) != A116417(n).

Original entry on oeis.org

34, 35, 36, 37, 38, 39, 44, 45, 46, 47, 50, 51, 52, 53, 54, 55, 60, 61, 62, 63, 98, 99, 100, 101, 102, 103, 108, 109, 110, 111, 114, 115, 116, 117, 118, 119, 124, 125, 126, 127, 164, 165, 166, 167, 172, 173, 174, 175, 180, 181, 182, 183, 188, 189, 190, 191
Offset: 1

Views

Author

Peter Kagey, Apr 17 2016

Keywords

Comments

a(2*n) = 1 + a(2*n-1) for all n > 0.

Examples

			a(1) = 34 because 34*2 = 68 is the first number such that the LCM of the exponents in its binary expansion (2 and 6) is unequal to the denominator of the sum of reciprocals: lcm(2, 6) = 6 != denominator(1/2 + 1/6) = 3.
Equivalently, A271410(34) = 6 != A116417(34) = 3.
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 1000, (LCM @@ # != Denominator[ Total[1/#]]) &@ Flatten@ Position[ Reverse@ IntegerDigits[#, 2], 1] &] (* Giovanni Resta, Apr 18 2016 *)

A272020 Irregular triangle read by rows: strictly decreasing sequences of positive numbers given in lexicographic order.

Original entry on oeis.org

1, 2, 2, 1, 3, 3, 1, 3, 2, 3, 2, 1, 4, 4, 1, 4, 2, 4, 2, 1, 4, 3, 4, 3, 1, 4, 3, 2, 4, 3, 2, 1, 5, 5, 1, 5, 2, 5, 2, 1, 5, 3, 5, 3, 1, 5, 3, 2, 5, 3, 2, 1, 5, 4, 5, 4, 1, 5, 4, 2, 5, 4, 2, 1, 5, 4, 3, 5, 4, 3, 1, 5, 4, 3, 2, 5, 4, 3, 2, 1, 6, 6, 1, 6, 2, 6, 2, 1
Offset: 0

Views

Author

Peter Kagey, Apr 17 2016

Keywords

Comments

Length of n-th row given by A000120(n);
Min of n-th row given by A001511(n);
Sum of n-th row given by A029931(n);
Product of n-th row given by A096111(n);
Max of n-th row given by A113473(n);
Numerator of sum of reciprocals of n-th row given by A116416(n);
Denominator of sum of reciprocals of n-th row given by A116417(n);
LCM of n-th row given by A271410(n).
The first appearance of n is at A001787(n - 1).
n-th row begins at index A000788(n - 1) for n > 0.
Also the reversed positions of 1's in the reversed binary expansion of n. Also the reversed partial sums of the n-th composition in standard order (row n of A066099). Reversing rows gives A048793. - Gus Wiseman, Jan 17 2023

Examples

			Row n is given by the exponents in the binary expansion of 2*n. For example, row 5 = [3, 1] because 2*5 = 2^3 + 2^1.
Row 0: []
Row 1: [1]
Row 2: [2]
Row 3: [2, 1]
Row 4: [3]
Row 5: [3, 1]
Row 6: [3, 2]
Row 7: [3, 2, 1]
		

Crossrefs

Cf. A048793 gives the rows in reverse order.
Cf. A272011.
Lasts are A001511.
Heinz numbers of the rows are A019565.
Firsts are A029837 or A070939 or A113473.
Row sums are A029931.
A066099 lists standard comps, partial sums A358134, weighted sum A359042.

Programs

  • Maple
    T:= proc(n) local i, l, m; l:= NULL; m:= n;
          if n=0 then return [][] fi; for i while m>0 do
          if irem(m, 2, 'm')=1 then l:=i, l fi od; l
        end:
    seq(T(n), n=0..35);  # Alois P. Heinz, Nov 27 2024
  • Mathematica
    Table[Reverse[Join@@Position[Reverse[IntegerDigits[n,2]],1]],{n,0,100}] (* Gus Wiseman, Jan 17 2023 *)

A333226 Least common multiple of the n-th composition in standard order.

Original entry on oeis.org

1, 2, 1, 3, 2, 2, 1, 4, 3, 2, 2, 3, 2, 2, 1, 5, 4, 6, 3, 6, 2, 2, 2, 4, 3, 2, 2, 3, 2, 2, 1, 6, 5, 4, 4, 3, 6, 6, 3, 4, 6, 2, 2, 6, 2, 2, 2, 5, 4, 6, 3, 6, 2, 2, 2, 4, 3, 2, 2, 3, 2, 2, 1, 7, 6, 10, 5, 12, 4, 4, 4, 12, 3, 6, 6, 3, 6, 6, 3, 10, 4, 6, 6, 6, 2, 2
Offset: 1

Views

Author

Gus Wiseman, Mar 26 2020

Keywords

Comments

The k-th composition in standard order (row k of 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.

Crossrefs

The version for binary indices is A271410.
The version for prime indices is A290103.
Positions of first appearances are A333225.
Let q(k) be the k-th composition in standard order:
- The terms of q(k) are row k of A066099.
- The sum of q(k) is A070939(k).
- The product of q(k) is A124758(k).
- The GCD of q(k) is A326674(k).
- The LCM of q(k) is A333226(k).

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Table[LCM@@stc[n],{n,100}]

A116417 If n = Sum_{m>=1} 2^(m-1) * b(n,m), where each b(n,m) is 0 or 1 and the sum is a finite sum, then a(n) = denominator of Sum_{m>=1} b(n,m)/m.

Original entry on oeis.org

1, 1, 2, 2, 3, 3, 6, 6, 4, 4, 4, 4, 12, 12, 12, 12, 5, 5, 10, 10, 15, 15, 30, 30, 20, 20, 20, 20, 60, 60, 60, 60, 6, 6, 3, 3, 2, 2, 1, 1, 12, 12, 12, 12, 4, 4, 4, 4, 30, 30, 15, 15, 10, 10, 5, 5, 60, 60, 60, 60, 20, 20, 20, 20, 7, 7, 14, 14, 21, 21, 42, 42, 28, 28, 28, 28, 84, 84, 84, 84
Offset: 0

Views

Author

Leroy Quet, Feb 13 2006

Keywords

Examples

			13 in binary is 1101. So a(13) is the denominator of 1/4 + 1/3 + 1 = 19/12, since the binary digits at positions (from right to left) 1, 3 and 4 are each 1 and the other digits are 0.
		

Crossrefs

Programs

  • Mathematica
    Table[Denominator@ Total@ MapIndexed[#1/ First@ #2 &, Reverse@ IntegerDigits[n, 2]], {n, 0, 79}] (* Michael De Vlieger, Aug 19 2017 *)
  • PARI
    a(n) = {my(b = Vecrev(binary(n))); denominator(sum(k=1, #b, b[k]/k));} \\ Michel Marcus, Apr 18 2016

Extensions

More terms from Joshua Zucker, May 03 2006

A333225 Position of first appearance of n in A333226 (LCMs of compositions in standard order).

Original entry on oeis.org

1, 2, 4, 8, 16, 18, 64, 128, 256, 66, 1024, 68, 4096, 258, 132, 32768, 65536, 1026, 262144, 264, 516, 4098
Offset: 1

Views

Author

Gus Wiseman, Mar 26 2020

Keywords

Comments

The k-th composition in standard order (row k of 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.

Examples

			The sequence together with the corresponding compositions begins:
       1: (1)
       2: (2)
       4: (3)
       8: (4)
      16: (5)
      18: (3,2)
      64: (7)
     128: (8)
     256: (9)
      66: (5,2)
    1024: (11)
      68: (4,3)
    4096: (13)
     258: (7,2)
     132: (5,3)
   32768: (16)
   65536: (17)
    1026: (9,2)
  262144: (19)
     264: (5,4)
		

Crossrefs

The version for binary indices is A333492.
The version for prime indices is A330225.
Let q(k) be the k-th composition in standard order:
- The terms of q(k) are row k of A066099.
- The sum of q(k) is A070939(k).
- The product of q(k) is A124758(k).
- The GCD of q(k) is A326674(k).
- The LCM of q(k) is A333226(k).

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join@@Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    q=Table[LCM@@stc[n],{n,10000}];
    Table[Position[q,i][[1,1]],{i,First[Split[Union[q],#1+1==#2&]]}]

A366027 Lexicographically earliest sequence of distinct positive integers such that for any n > 0, if 2^(d-1) appears in the binary expansion of a(n) then d divides n.

Original entry on oeis.org

1, 2, 4, 3, 16, 5, 64, 8, 256, 17, 1024, 6, 4096, 65, 20, 9, 65536, 7, 262144, 10, 68, 1025, 4194304, 11, 16777216, 4097, 257, 66, 268435456, 18, 1073741824, 128, 1028, 65537, 80, 12, 68719476736, 262145, 4100, 19, 1099511627776, 32, 4398046511104, 1026, 21
Offset: 1

Views

Author

Rémy Sigrist, Sep 26 2023

Keywords

Comments

In other words, the binary expansion of a(n) encodes a subset of the divisors of n.
This sequence is a permutation of the positive integers with inverse A366028.

Examples

			The first terms, alongside their binary expansion and the corresponding divisors d, are:
  n   a(n)    bin(a(n))            Corresponding divisors
  --  ------  -------------------  ----------------------
   1       1                    1  {1}
   2       2                   10  {2}
   3       4                  100  {3}
   4       3                   11  {2, 1}
   5      16                10000  {5}
   6       5                  101  {3, 1}
   7      64              1000000  {7}
   8       8                 1000  {4}
   9     256            100000000  {9}
  10      17                10001  {5, 1}
  11    1024          10000000000  {11}
  12       6                  110  {3, 2}
  13    4096        1000000000000  {13}
  14      65              1000001  {7, 1}
  15      20                10100  {5, 3}
  16       9                 1001  {4, 1}
  17   65536    10000000000000000  {17}
  18       7                  111  {3, 2, 1}
		

Crossrefs

Cf. A048793, A271410, A366028 (inverse).

Programs

  • PARI
    See Links section.

Formula

a(p) = 2^(p-1) for any prime number p.
a(2*p) = 2^(p-1) + 1 for any prime number p.

A366028 Inverse permutation to A366027.

Original entry on oeis.org

1, 2, 4, 3, 6, 12, 18, 8, 16, 20, 24, 36, 48, 60, 72, 5, 10, 30, 40, 15, 45, 90, 120, 80, 100, 140, 160, 180, 240, 300, 360, 42, 54, 66, 78, 84, 96, 102, 108, 132, 144, 156, 168, 192, 204, 216, 228, 150, 210, 270, 330, 390, 420, 450, 480, 540, 600, 660, 720
Offset: 1

Views

Author

Rémy Sigrist, Sep 26 2023

Keywords

Comments

For any n > 0, a(n) is a multiple of A271410(n).

Examples

			A366027(42) = 32, hence a(32) = 42.
		

Crossrefs

Programs

  • PARI
    See Links section.

A337744 Numbers of the form Sum_{e in S} 2^(e-1) where S is a finite set of positive integers such that any element of S divides the sum of the elements of S.

Original entry on oeis.org

0, 1, 2, 4, 7, 8, 16, 32, 39, 42, 64, 128, 175, 256, 291, 292, 512, 537, 1024, 2048, 2087, 2090, 2181, 2184, 2350, 4096, 8192, 8267, 16384, 16437, 16902, 16912, 32768, 34983, 34986, 65536, 131072, 131342, 131363, 131364, 133127, 133130, 133152, 262144, 524288
Offset: 1

Views

Author

Rémy Sigrist, Sep 26 2020

Keywords

Comments

In other words, this sequence corresponds to the number m such that A271410(m) divides A029931(m).
For any n > 0, A125297(n) gives the number of positive terms < 2^n.
Every power of 2 belongs to the sequence.

Examples

			The first terms, alongside their binary representation and corresponding set S, are:
  n   a(n)  bin(a(n))   S
  --  ----  ----------  ------------------
   1     0           0  {}
   2     1           1  {1}
   3     2          10  {2}
   4     4         100  {3}
   5     7         111  {1, 2, 3}
   6     8        1000  {4}
   7    16       10000  {5}
   8    32      100000  {6}
   9    39      100111  {1, 2, 3, 6}
  10    42      101010  {2, 4, 6}
  11    64     1000000  {7}
  12   128    10000000  {8}
  13   175    10101111  {1, 2, 3, 4, 6, 8}
  14   256   100000000  {9}
  15   291   100100011  {1, 2, 6, 9}
  16   292   100100100  {3, 6, 9}
		

Crossrefs

Programs

  • PARI
    is(n) = { my (b=Vecrev(binary(n)), s=select(k -> b[k], [1..#b])); vecsum(s) % lcm(s)==0 }

A358970 Nonnegative numbers m such that if 2^k appears in the binary expansion of m, then k+1 divides m.

Original entry on oeis.org

0, 1, 2, 6, 8, 12, 36, 60, 128, 136, 168, 261, 288, 520, 530, 540, 630, 640, 1056, 2052, 2088, 2100, 2184, 2208, 2304, 2340, 2520, 2580, 4134, 8232, 8400, 8820, 9240, 10248, 10920, 16440, 16560, 16920, 16950, 17010, 17040, 17190, 17280, 18480, 18600, 18720
Offset: 1

Views

Author

Rémy Sigrist, Dec 07 2022

Keywords

Comments

In other words, numbers whose binary expansion encodes a subset of their divisors.
Also numbers m divisible by A271410(m).
This sequence is infinite as it contains A058891.

Examples

			60 = 2^5 + 2^4 + 2^3 + 2^2 and 60 is divisible by 5+1, 4+1, 3+1 and 2+1, so 60 belongs to the sequence.
42 = 2^5 + 2^3 + 2^1 and 42 is not divisible by 3+1, so 42 does not belong to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[20000], Function[n, AllTrue[Position[Reverse@ IntegerDigits[n, 2], 1][[All, 1]], Divisible[n, #] &]]] (* Michael De Vlieger, Dec 12 2022 *)
  • PARI
    is(n) = { my (r=n, k); while (r, r-=2^k=valuation(r,2); if (n%(k+1), return (0););); return (1); }
    
  • Python
    def ok(n): return all(n%(k+1) == 0 or not n&(1<Michael S. Branicky, Dec 07 2022
    
  • Python
    from itertools import count, islice
    def A358970_gen(startvalue=0): # generator of terms >= startvalue
        return filter(lambda n:not any(n%i for i,b in enumerate(bin(n)[:1:-1],1) if b=='1'),count(max(startvalue,0)))
    A358970_list = list(islice(A358970_gen(),20)) # Chai Wah Wu, Dec 12 2022
Showing 1-10 of 10 results.