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.

Previous Showing 21-25 of 25 results.

A087275 Write n in binary: 1ab..yz, then a(n) = 1b..yz + ... + 1yz + 1z + 1.

Original entry on oeis.org

0, 1, 1, 3, 4, 3, 4, 7, 9, 9, 11, 7, 9, 9, 11, 15, 18, 19, 22, 19, 22, 23, 26, 15, 18, 19, 22, 19, 22, 23, 26, 31, 35, 37, 41, 39, 43, 45, 49, 39, 43, 45, 49, 47, 51, 53, 57, 31, 35, 37, 41, 39, 43, 45, 49, 39, 43, 45, 49, 47, 51, 53, 57, 63, 68, 71, 76
Offset: 1

Views

Author

Ralf Stephan, Aug 27 2003

Keywords

Comments

a(n) = A087276(n) - n.

Crossrefs

Programs

  • PARI
    a(n)=local(v, s, l); v=binary(n); l=length(v); s=0; for(k=2, l, s=s+2^(l-k)+sum(m=k+1, l, v[m]*2^(l-m))); s

Formula

a(1) = 0, a(2n) = 2*a(n) + 1, a(2n+1) = 2*a(n) + floor(log_2(n)) + 1.

A087276 Write n in binary: 1ab..yz, then a(n) = 1ab..yz + ... + 1yz + 1z + 1.

Original entry on oeis.org

1, 3, 4, 7, 9, 9, 11, 15, 18, 19, 22, 19, 22, 23, 26, 31, 35, 37, 41, 39, 43, 45, 49, 39, 43, 45, 49, 47, 51, 53, 57, 63, 68, 71, 76, 75, 80, 83, 88, 79, 84, 87, 92, 91, 96, 99, 104, 79, 84, 87, 92, 91, 96, 99, 104, 95, 100, 103, 108, 107, 112, 115
Offset: 1

Views

Author

Ralf Stephan, Aug 27 2003

Keywords

Comments

a(n) = A087275(n) + n.

Crossrefs

Programs

  • PARI
    a(n)=local(v, s, l); v=binary(n); l=length(v); s=0; for(k=2, l, s=s+2^(l-k)+sum(m=k+1, l, v[m]*2^(l-m))); s+n

Formula

a(1) = 1, a(2n) = 2a(n) + 1, a(2n+1) = 2*a(n) + floor(log_2(n)) + 2.

A171429 Irregular table of positive integers with the property that each term on row r can be mapped to a numeric partition conjugate to the partition mapped by the corresponding value within sequence A161924.

Original entry on oeis.org

1, 3, 2, 7, 5, 4, 15, 11, 6, 9, 8, 31, 23, 13, 19, 10, 17, 16, 63, 47, 27, 39, 14, 21, 12, 35, 18, 33, 32, 127, 95, 55, 79, 29, 43, 25, 71, 22, 37, 20, 67, 34, 65, 64, 255, 191, 111, 159, 59, 87, 51, 143, 30, 45, 26, 75, 41, 24, 135, 38, 69, 36, 131, 66, 129, 128, 511, 383, 223
Offset: 1

Views

Author

Alford Arnold, Dec 08 2009, Dec 10 2009

Keywords

Comments

This appears to be a sorted version of sequence A059894.

Examples

			a(29) = 20 and a(20) = 29, forming a pair of numbers mapping to partitions 4+3=7 and 2+2+2+1=7.
The table has shape A000041 and begins
   1;
   3  2;
   7  5  4;
  15 11  6  9  8;
  ...
		

Crossrefs

A307544 Irregular triangle read by rows: T(n,k) = A087207(A307540(n,k)).

Original entry on oeis.org

0, 1, 3, 2, 7, 5, 6, 4, 15, 11, 13, 9, 14, 10, 12, 8, 31, 23, 27, 19, 29, 21, 25, 30, 17, 22, 26, 18, 28, 20, 24, 16, 63, 47, 55, 59, 39, 43, 51, 61, 35, 45, 53, 57, 37, 62, 41, 49, 46, 54, 33, 58, 38, 42, 50, 60, 34, 44, 52, 56, 36, 40, 48, 32, 127, 95, 111, 119
Offset: 0

Views

Author

Michael De Vlieger, Apr 19 2019

Keywords

Comments

Let gpf(m) = A006530(m) and let phi(m) = A000010(m) for m in A005117.
Row n contains m in A005117 such that A006530(m) = n, sorted such that phi(m)/m increases as k increases.
Let m be the squarefree kernel A007947(m') of m'. We only consider squarefree m since phi(m)/m = phi(m')/m'. Let prime p | n and prime q be a nondivisor of n.
Since m is squarefree, we might encode the multiplicities of its prime divisors in a positional notation M that is finite at n significant digits. For example, m = 42 can be encoded reverse(A067255(42)) = 1,0,1,1 = 7^1 * 5^0 * 3^1 * 2^1. It is necessary to reverse row m of A067255 (hereinafter simply A067255(m)) so as to preserve zeros in M = A067255(m) pertaining to small nondivisor primes q < p. The code M is a series of 0's and 1's since m is squarefree. Then it is clear that row n contains all m such that A067255(m) has n terms, and there are 2^(n - 1) possible terms for n >= 1.
We may use an approach that generates the binary expansion of the range 2^(n - 1) < M < 2^n - 1, or we may append 1 to the reversed (n - 1)-tuples of {1, 0} (as A059894) to achieve codes M -> m for each row n.
Originally it was thought that the codes M were in order of the latter algorithm, and we could avoid sorting. Observation shows that the m still require sorting by the function phi(m)/m indeed to be in increasing order in row n. Still, the latter approach is slightly more efficient than the former in generating the sequence.
This sequence interprets the code M as a binary value. The sequence is a permutation of the natural numbers since the ratio phi(m)/m is unique for squarefree m.
This sequence and A059894 are identical for 1 <= n <= 23.
Numbers of terms in rows n of this sequence and A059894 (partitioned by powers of 2) that are coincident: 1, 2, 4, 8, 14, 14, 10, 26, 14, 20, 10, 16, 22, 12, 18, 18, 16, 14, 18, 18, 18, 14, 16, ...}.
The graphs of this sequence and A059894 are similar.
The graph of this sequence feature squares of size 2^(j-1) at (x,y) = (h,h) where h = 2^j, integers, that have pi-radian rotational symmetry.

Examples

			First terms of this sequence appear bottom to top in the chart below. The values of n appear in the header, values m = T(n,k) followed parenthetically by phi(m)/m appear in column n. In square brackets, we write the multiplicities of primes in positional order with the smallest prime at right (big-endian). The x axis plots k according to primepi(gpf(m)), while the y axis plots k according to phi(m)/m:
    0       1          2             3             4
    .       .          .             .             .
--- 1 ------------------------------------------------
  (1/1)     .          .             .             .
   [0]      .          .             .             .
    .       .          .             .             .
    .       .          .             .             7
    .       .          .             5           (6/7)
    .       .          .           (4/5)        [1000]
    .       .          .           [100]           .
    .       .          .             .            35
    .       .          3             .          (24/35)
    .       .        (2/3)           .          [1100]
    .       .        [10]            .             .
    .       .          .             .             .
    .       .          .             .            21
    .       .          .             .           (4/7)
    .       .          .            15          [1010]
    .       .          .          (8/15)           .
    .       2          .           [110]           .
    .     (1/2)        .             .             .
    .      [1]         .             .            105
    .       .          .             .          (16/35)
    .       .          .             .          [1110]
    .       .          .             .            14
    .       .          .            10           (3/7)
    .       .          .           (2/5)        [1001]
    .       .          .           [101]           .
    .       .          .             .            70
    .       .          6             .          (12/35)
    .       .        (1/3)           .          [1101]
    .       .        [11]            .            42
    .       .          .            30           (2/7)
    .       .          .          (4/15)        [1011]
    .       .          .           [111]          210
    .       .          .             .           (8/35)
    .       .          .             .          [1111]
...
a(1) = 0 since T(0,1) = 1 = empty product.
a(2) = 1 since T(1,1) = 2 = 2^1 -> binary "1" = decimal 1.
a(3) = 3 since T(2,1) = 6 = 2^1 * 3^1 -> binary "11" = decimal 3.
a(4) = 2 since T(2,2) = 3 = 2^0 * 3^1 -> binary "10" = decimal 2.
a(5) = 7 since T(3,1) = 30 = 2^1 * 3^1 * 5^1 -> binary "111" = decimal 7, etc.
Graph of first 32 terms: (Start)
              x
                       x
                   x
                           x
                 x
                         x
                     x
                x
                             x
                        x
                    x
                            x
                  x
                          x
                      x
                              x
       x
           x
         x
             x
        x
            x
          x
              x
   x
     x
    x
      x
x
  x
x
(End)
From _Antti Karttunen_, Jan 10 2020: (Start)
Arranged as a binary tree:
                                       0
                                       |
                    ...................1...................
                   3                                       2
         7......../ \........5                   6......../ \........4
        / \                 / \                 / \                 / \
       /   \               /   \               /   \               /   \
      /     \             /     \             /     \             /     \
    15       11         13       9          14       10         12       8
  31  23   27  19     29  21   25 30      17  22   26  18     28  20   24 16
etc.
(End)
		

Crossrefs

Programs

  • Mathematica
    Prepend[Array[SortBy[#, Last] &@ Map[{#2, EulerPhi[#1]/#1} & @@ {Times @@  MapIndexed[Prime[First@ #2]^#1 &, Reverse@ #], FromDigits[#, 2]} &, Map[Prepend[Reverse@ #, 1] &, Tuples[{1, 0}, # - 1]]] &, 7], {{0, 0, 1}}][[All, All, 1]] // Flatten
  • PARI
    up_to = 1023;
    rat(n) = { my(m=1, p=2); while(n, if(n%2, m *= (p-1)/p); n >>= 1; p = nextprime(1+p)); (m); };
    cmpA307544(a,b) = if(!a,sign(-b),if(!b,sign(a), my(as=logint(a,2), bs=logint(b,2)); if(as!=bs, sign(as-bs), sign(rat(a)-rat(b)))));
    A307544list(up_to) = vecsort(vector(1+up_to,n,n-1), cmpA307544);
    v307544 = A307544list(up_to);
    A307544(n) = v307544[1+n]; \\ Antti Karttunen, Jan 10 2020

Formula

For n > 0, row lengths = 2^(n - 1).
T(n,1) = 2^n - 1 = A000225(n).
T(n,2^(n - 1)) = 2^(n - 1).

A345401 a(n) is the unique odd number h such that BCR(h*2^m-1) = 2n (except for BCR(0) = 1) where BCR is bit complement and reverse per A036044.

Original entry on oeis.org

1, 3, 7, 5, 15, 11, 13, 9, 31, 23, 27, 19, 29, 21, 25, 17, 63, 47, 55, 39, 59, 43, 51, 35, 61, 45, 53, 37, 57, 41, 49, 33, 127, 95, 111, 79, 119, 87, 103, 71, 123, 91, 107, 75, 115, 83, 99, 67, 125, 93, 109, 77, 117, 85, 101, 69, 121, 89, 105, 73, 113, 81, 97, 65, 255, 191
Offset: 0

Views

Author

Bernard Schott, Jun 18 2021

Keywords

Comments

This sequence is a permutation of the odd numbers.
We have BCR(a(n)*2^m-1) = 2n when n = 0 for m >= 1, and BCR(a(n)*2^m-1) = 2n when n >= 1 for m >= 0.
Why this exception when n = 0? As a(0) = 1, we have BCR(1*2^m-1) = 2*0 = 0 only for m >= 1, because, for m = 0, we have BCR(1*2^0-1) = BCR(0) = 1 <> 2*0 = 0.

Examples

			a(0) = 1 because BCR(1*2^m-1) = 2*0 = 0 for m >= 1 (A000225).
a(1) = 3 because BCR(3*2^m-1) = 2*1 = 2 for m >= 0 (A153893).
a(2) = 7 because BCR(7*2^m-1) = 2*2 = 4 for m >= 0 (A086224).
Indeed, a(1) = 3 because 3*2^m-1 = 1011..11_2 (i.e., 10 followed by m 1's), whose bit complement is 0100..00, which reverses to 10_2 = 2 = 2*1.
Also, a(43) = 75 because 75*2^m-1 = 100101011..11_2 (i.e., 1001010 followed by m 1's), whose bit complement is 011010100..00, which reverses to 1010110_2 = 86 = 2*43.
		

Crossrefs

Cf. A036044 (BCR), A059894.
When BCR(n) = 0, 2, 4, 6, 8, 10, 12, then corresponding a(n) = h = 1, 3, 7, 5, 15, 11, 13 and numbers h*2^m-1 are respectively in A000225, A153893, A086224, A153894, A196305, A086225, A198274.

Formula

a(n) = BCR(2*n) + 1 for n >= 1.
a(n) = 2*A059894(n) + 1 for n >= 1. - Hugo Pfoertner, Jun 18 2021
Previous Showing 21-25 of 25 results.