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 11-18 of 18 results.

A307266 Row 8 of array in A059897.

Original entry on oeis.org

8, 4, 24, 2, 40, 12, 56, 1, 72, 20, 88, 6, 104, 28, 120, 128, 136, 36, 152, 10, 168, 44, 184, 3, 200, 52, 216, 14, 232, 60, 248, 64, 264, 68, 280, 18, 296, 76, 312, 5, 328, 84, 344, 22, 360, 92, 376, 384, 392, 100, 408, 26, 424, 108, 440, 7, 456, 116, 472, 30, 488, 124, 504, 32
Offset: 1

Views

Author

Peter Munn, Apr 01 2019

Keywords

Comments

Also column 8 of A059897.
A self-inverse permutation of the positive integers with no fixed points; A073675 composed with A120230.
The permutation swaps pairs of integers whose ratio is 1:8 or 1:2, these ratios corresponding to the factorizations 1*8 = 2*4 = 8.

Crossrefs

Programs

  • PARI
    T(n, k) = {if (n==1, return (k)); if (k==1, return (n)); my(fn=factor(n), fk=factor(k)); vp = setunion(fn[, 1]~, fk[, 1]~); prod(i=1, #vp, vp[i]^(bitxor(valuation(n, vp[i]), valuation(k, vp[i])))); }
    a(n) = T(n, 8); \\ Michel Marcus, Apr 23 2019

Formula

a(n) = A059897(8,n) = A059897(n,8).
a(n) = A073675(A120230(n)) = A120230(A073675(n)) = A073675(n) * A120230(n) / n.

A307267 Row 24 of array in A059897.

Original entry on oeis.org

24, 12, 8, 6, 120, 4, 168, 3, 216, 60, 264, 2, 312, 84, 40, 384, 408, 108, 456, 30, 56, 132, 552, 1, 600, 156, 72, 42, 696, 20, 744, 192, 88, 204, 840, 54, 888, 228, 104, 15, 984, 28, 1032, 66, 1080, 276, 1128, 128, 1176, 300, 136, 78, 1272, 36, 1320, 21, 152, 348, 1416, 10
Offset: 1

Views

Author

Peter Munn, Apr 01 2019

Keywords

Comments

Also column 24 of A059897.
A self-inverse permutation of the positive integers with no fixed points; a composition of A073675, A120229 and A120230.
The permutation swaps pairs of integers whose ratio is 1:24, 1:6, 3:8 or 2:3, these ratios corresponding to the factorizations 1*24 = 2*12 = 3*8 = 4*6 = 24. Row 24 is the first row of A059897 to exhibit more than 2 such ratios.

Crossrefs

Programs

  • PARI
    T(n, k) = {if (n==1, return (k)); if (k==1, return (n)); my(fn=factor(n), fk=factor(k)); vp = setunion(fn[, 1]~, fk[, 1]~); prod(i=1, #vp, vp[i]^(bitxor(valuation(n, vp[i]), valuation(k, vp[i])))); }
    a(n) = T(n, 24); \\ Michel Marcus, Apr 23 2019

Formula

a(n) = A059897(24,n) = A059897(n,24).
a(n) = A073675(A120229(A120230(n))) = A073675(n) * A120229(n) * A120230(n) / n^2.

A366390 Dirichlet inverse of A366389.

Original entry on oeis.org

1, -2, -3, 0, -5, 6, -7, 0, 0, 10, -26, 0, -22, 14, 15, 0, -17, 0, -25, 0, 21, 91, -29, 0, 6, 77, 0, 0, -23, -30, -31, 0, 123, 34, -28, 0, -82, 50, 75, 0, -74, -42, -106, -156, 0, 58, -122, 0, -21, -12, 51, -132, -86, 0, 142, 0, 111, 46, -110, 0, -94, 62, 0, 0, 155, -480, -97, 0, 93, 203, -113, 0, -73, 287, -66, 0, 275
Offset: 1

Views

Author

Antti Karttunen, Oct 22 2023

Keywords

Crossrefs

Cf. A010872, A030101, A057889, A073675, A366389, A366392 (rgs-transform).
Cf. also A365711.

Programs

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA366389(n/d) * a(d).

A366392 Lexicographically earliest infinite sequence such that a(i) = a(j) => A366390(i) = A366390(j) for all i, j >= 1, where A366390 is the Dirichlet inverse of A366389.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 22 2023

Keywords

Comments

Restricted growth sequence transform of A366390.
For all i, j: a(i) = a(j) => A365428(i) = A365428(j) => A359377(i) = A359377(j).

Crossrefs

Programs

  • PARI
    \\ Needs also program given in A366389:
    up_to = 65537;
    rgs_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(om,invec[i]), my(pp = mapget(om, invec[i])); outvec[i] = outvec[pp] , mapput(om,invec[i],i); outvec[i] = u; u++ )); outvec; };
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA366389(n))));
    A366392(n) = v366392[n];

A118966 a(n) = (n+1)/2 if n occurs among the first n-1 terms of the sequence, otherwise a(n) = 2*n - 1.

Original entry on oeis.org

1, 3, 2, 7, 9, 11, 4, 15, 5, 19, 6, 23, 25, 27, 8, 31, 33, 35, 10, 39, 41, 43, 12, 47, 13, 51, 14, 55, 57, 59, 16, 63, 17, 67, 18, 71, 73, 75, 20, 79, 21, 83, 22, 87, 89, 91, 24, 95, 97, 99, 26, 103, 105, 107, 28, 111, 29, 115, 30, 119, 121, 123, 32, 127, 129, 131, 34, 135
Offset: 1

Views

Author

Leroy Quet, May 07 2006

Keywords

Comments

Sequence is a permutation of the positive integers. It is also its own inverse (i.e., a(a(n)) = n).
From Thomas Scheuerle, Dec 24 2020: (Start)
The same sequence can be generated by defining a(0)=0 and a(1)=1 and, for each n>1, choosing the smallest unused positive integer such that max(a(n)/n) will increase or min(a(n)/n) will decrease.
Proof: Three conditions are required to guarantee that the definitions are equivalent. The first condition is that this is a permutation; this is satisfied because this is a permutation involution. This is because (n+1)/2 is the inverse function of 2n-1, which is applied only if n is not already used in the sequence. The second condition is that, with each new term, max(a(n)/n) increases or min(a(n)/n) decreases. This is obviously the case because the next term would be either 2n-1, with would increase max(a(n)/n), or (n+1)/2, which would decrease min(a(n)/n). The third and last condition is that each new term is the smallest possible number satisfying the first two conditions. This holds because 2n-1 is the smallest possible number m*n+b where the slope m is > 1 and a(1) = 1. (A slope > 1 is needed for condition 2.)
(End)

Crossrefs

Programs

  • MATLAB
    % Program to test alternative definition:
    %"Permutation of natural number such that max(a(n)/n)-min(a(n)/n) increases monotonously by using smallest possible next number, a(0) = 0, a(1) = 1."
    function a = A118966( max_n )
        a(1) = 0;
        a(2) = 1;
        m_max = 1;
        m_min = 1;
        n = 3;
        t = 1;
        while n <= max_n
            % search next number t not yet used in a
            while ~isempty(find(a==t, 1))
                t = t+1;
            end
            m = t/(n-1);
            % check slope m
            if m < m_min || m > m_max
                % we found a candidate
                a(n) = t;
                n = n+1;
                if m > m_max
                    m_max = m;
                end
                if m < m_min
                    m_min = m;
                end
                t = 1;
            else
                % number t does not yet fit
                t = t+1;
            end
        end
    end
    % Thomas Scheuerle, Dec 24 2020
  • Mathematica
    f[s_] := Block[{n = Length@s}, Append[s, If[MemberQ[s, n], (n + 1)/2, 2n - 1]]]; Rest@Nest[f, {1}, 70] (* Robert G. Wilson v, May 16 2006 *)
    (* Program to test alternative definition : *)
    (* "Permutation of natural number such that max(a(n)/n)-min(a(n)/n) increases monotonously by using smallest possible next number, a(0) = 0, a(1) = 1." *)
    Block[{a = {0, 1}, b = {1}, c = {0}, k, r, s}, Do[k = 2; While[Nand[Set[s, Max[#] - Min[#]] > c[[-1]], FreeQ[a, k]] &@ Append[b, Set[r, k/i]], k++]; AppendTo[a, k]; AppendTo[b, r]; AppendTo[c, s], {i, 2, 55}]; a] (* Michael De Vlieger, Dec 11 2020 *)

Formula

a(n) = A073675(n-1) + 1. - Thomas Scheuerle, Dec 27 2020

Extensions

More terms from Robert G. Wilson v, May 16 2006

A120231 Split-floor-multiplier sequence (SFMS) using multipliers 2/3 and 3/2. (SFMS is defined at A120229.).

Original entry on oeis.org

1, 3, 2, 6, 7, 4, 10, 5, 13, 15, 16, 8, 19, 9, 22, 24, 11, 12, 28, 30, 14, 33, 34, 36, 37, 17, 18, 42, 43, 20, 46, 21, 49, 51, 23, 54, 55, 25, 26, 60, 27, 63, 64, 29, 67, 69, 31, 32, 73, 75, 76, 78, 35, 81, 82, 84, 38, 87, 39, 40, 91, 41, 94, 96, 97, 44, 100, 45, 103, 105, 47
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2006

Keywords

Comments

A permutation of the natural numbers.

Examples

			a(1)=[3/2]=1 because [2/3] is not positive.
a(2)=[2*3/2]=3.
a(3)=[3*2/3]=2.
		

Crossrefs

Formula

a(n)=[2n/3] if this is positive and new, else a(n)=[3n/2].

A120232 Inverse of A120231.

Original entry on oeis.org

1, 3, 2, 6, 8, 4, 5, 12, 14, 7, 17, 18, 9, 21, 10, 11, 26, 27, 13, 30, 32, 15, 35, 16, 38, 39, 41, 19, 44, 20, 47, 48, 22, 23, 53, 24, 25, 57, 59, 60, 62, 28, 29, 66, 68, 31, 71, 72, 33, 75, 34, 78, 80, 36, 37, 84, 86, 87, 89, 40, 92, 93, 42, 43, 98, 99, 45, 102, 46, 105, 107
Offset: 1

Views

Author

Clark Kimberling, Jun 11 2006

Keywords

Comments

A permutation of the natural numbers.

Examples

			A120231, written as a function, is
{(1,1),(2,3),(3,2),(4,6),(5,7),(6,4),(7,10),(8,5)...}.
Reversing each ordered pair and reordering gives
{(1,1),(2,3),(3,2),(4,6),(5,8),(6,4),(7,5),(8,12)...}.
Suppressing first components leaves
1,3,2,6,8,4,5,12,...
		

Crossrefs

A385342 Square array A(n,k) read by descending antidiagonals, where each row n starts with an ordered list of positive integers then we swap A(n,k) with the number in the position A(n, A(n,k*n)).

Original entry on oeis.org

1, 2, 2, 3, 1, 3, 4, 6, 6, 4, 5, 8, 1, 8, 5, 6, 10, 12, 12, 10, 6, 7, 12, 15, 1, 15, 3, 7, 8, 14, 18, 20, 20, 2, 14, 8, 9, 16, 21, 24, 1, 24, 21, 4, 9, 10, 18, 24, 28, 30, 30, 28, 24, 18, 10, 11, 20, 27, 32, 35, 1, 35, 2, 27, 5, 11, 12, 22, 30, 36, 40, 42, 42, 40, 36, 30, 22, 12
Offset: 1

Views

Author

Ali Sada, Jun 26 2025

Keywords

Comments

The lower triangular array is the multiplication table.
The second row is A073675.
The first superdiagonal and the first subdiagonal are both A002378.

Examples

			The square array begins:
  1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, ...
  2, 1, 6, 8, 10, 3, 14, 4, 18, 5, 22, 24, 26, 7, 30, 32, 34, ...
  3, 6, 1, 12, 15, 2, 21, 24, 27, 30, 33, 4, 39, 42, 5, 48, 51, ...
  4, 8, 12, 1, 20, 24, 28, 2, 36, 40, 44, 3, 52, 56, 60, 64, 68, ...
  5, 10, 15, 20, 1, 30, 35, 40, 45, 2, 55, 60, 65, 70, 3, 80, 85, ...
  6, 12, 18, 24, 30, 1, 42, 48, 54, 60, 66, 2, 78, 84, 90, 96, 102, ...
  7, 14, 21, 28, 35, 42, 1, 56, 63, 70, 77, 84, 91, 2, 105, 112, 119, ...
  8, 16, 24, 32, 40, 48, 56, 1, 72, 80, 88, 96, 104, 112, 120, 2, 136, ...
  9, 18, 27, 36, 45, 54, 63, 72, 1, 90, 99, 108, 117, 126, 135, 144, 153, ...
  10, 20, 30, 40, 50, 60, 70, 80, 90, 1, 110, 120, 130, 140, 150, 160, 170, ...
		

Crossrefs

Previous Showing 11-18 of 18 results.