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 20 results. Next

A253565 Permutation of natural numbers: a(0) = 1, a(1) = 2; after which, a(2n) = A253550(a(n)), a(2n+1) = A253560(a(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 6, 8, 7, 25, 15, 27, 10, 18, 12, 16, 11, 49, 35, 125, 21, 75, 45, 81, 14, 50, 30, 54, 20, 36, 24, 32, 13, 121, 77, 343, 55, 245, 175, 625, 33, 147, 105, 375, 63, 225, 135, 243, 22, 98, 70, 250, 42, 150, 90, 162, 28, 100, 60, 108, 40, 72, 48, 64, 17, 169, 143, 1331, 91, 847, 539, 2401, 65, 605, 385, 1715, 275, 1225, 875, 3125, 39
Offset: 0

Views

Author

Antti Karttunen, Jan 03 2015

Keywords

Comments

This sequence can be represented as a binary tree. Each child to the left is obtained by applying A253550 to the parent, and each child to the right is obtained by applying A253560 to the parent:
1
|
...................2...................
3 4
5......../ \........9 6......../ \........8
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
7 25 15 27 10 18 12 16
11 49 35 125 21 75 45 81 14 50 30 54 20 36 24 32
etc.
Sequence A253563 is the mirror image of the same tree. Also in binary trees A005940 and A163511 the terms on level of the tree are some permutation of the terms present on the level n of this tree. A252464(n) gives the distance of n from 1 in all these trees. Of these four trees, this is the one where the left child is always smaller than the right child.
Note that the indexing of sequence starts from 0, although its range starts from one.
The term a(n) is the Heinz number of the adjusted partial sums of the n-th composition in standard order, where (1) 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, (2) the Heinz number of a partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k), and (3) we define the adjusted partial sums of a composition to be obtained by subtracting one from all parts, taking partial sums, and adding one back to all parts. See formula for a simplification. A triangular form is A242628. The inverse is A253566. The non-adjusted version is A358170. - Gus Wiseman, Dec 17 2022

Examples

			From _Gus Wiseman_, Dec 23 2022: (Start)
This represents the following bijection between compositions and partitions. The n-th composition in standard order together with the reversed prime indices of a(n) are:
   0:        () -> ()
   1:       (1) -> (1)
   2:       (2) -> (2)
   3:     (1,1) -> (1,1)
   4:       (3) -> (3)
   5:     (2,1) -> (2,2)
   6:     (1,2) -> (2,1)
   7:   (1,1,1) -> (1,1,1)
   8:       (4) -> (4)
   9:     (3,1) -> (3,3)
  10:     (2,2) -> (3,2)
  11:   (2,1,1) -> (2,2,2)
  12:     (1,3) -> (3,1)
  13:   (1,2,1) -> (2,2,1)
  14:   (1,1,2) -> (2,1,1)
  15: (1,1,1,1) -> (1,1,1,1)
(End)
		

Crossrefs

Inverse: A253566.
Cf. A252737 (row sums), A252738 (row products).
Applying A001222 gives A000120.
A reverse version is A005940.
These are the Heinz numbers of the rows of A242628.
Sum of prime indices of a(n) is A359043, reverse A161511.
A048793 gives partial sums of reversed standard comps, Heinz number A019565.
A066099 lists standard compositions.
A112798 list prime indices, sum A056239.
A358134 gives partial sums of standard compositions, Heinz number A358170.

Programs

  • Mathematica
    stc[n_]:=Differences[Prepend[Join @@ Position[Reverse[IntegerDigits[n,2]],1],0]]//Reverse;
    Times@@Prime/@#&/@Table[Accumulate[stc[n]-1]+1,{n,0,60}] (* Gus Wiseman, Dec 17 2022 *)

Formula

a(0) = 1, a(1) = 2; after which, a(2n) = A253550(a(n)), a(2n+1) = A253560(a(n)).
As a composition of related permutations:
a(n) = A122111(A163511(n)).
a(n) = A253563(A054429(n)).
Other identities and observations. For all n >= 0:
a(2n+1) - a(2n) > 0. [See the comment above.]
If n = 2^(x_1)+...+2^(x_k) then a(n) = Product_{i=1..k} prime(x_k-x_{i-1}-k+i) where x_0 = 0. - Gus Wiseman, Dec 23 2022

A253563 Permutation of natural numbers: a(0) = 1, a(1) = 2; after which, a(2n) = A253560(a(n)), a(2n+1) = A253550(a(n)).

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 9, 5, 16, 12, 18, 10, 27, 15, 25, 7, 32, 24, 36, 20, 54, 30, 50, 14, 81, 45, 75, 21, 125, 35, 49, 11, 64, 48, 72, 40, 108, 60, 100, 28, 162, 90, 150, 42, 250, 70, 98, 22, 243, 135, 225, 63, 375, 105, 147, 33, 625, 175, 245, 55, 343, 77, 121, 13, 128, 96, 144, 80, 216, 120, 200, 56, 324, 180, 300, 84, 500, 140, 196, 44
Offset: 0

Views

Author

Antti Karttunen, Jan 03 2015

Keywords

Comments

This sequence can be represented as a binary tree. Each child to the left is obtained by applying A253560 to the parent, and each child to the right is obtained by applying A253550 to the parent:
1
|
...................2...................
4 3
8......../ \........6 9......../ \........5
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
16 12 18 10 27 15 25 7
32 24 36 20 54 30 50 14 81 45 75 21 125 35 49 11
etc.
Sequence A253565 is the mirror image of the same tree. Also in binary trees A005940 and A163511 the terms on level of the tree are some permutation of the terms present on the level n of this tree. A252464(n) tells distance of n from 1 in all these trees. Of these four trees, this is the one where the left child is always larger than the right child.
Note that the indexing of sequence starts from 0, although its range starts from one.
a(n) (n>=1) can be obtained by the composition of a bijection between {1,2,3,4,...} and the set of integer partitions and a bijection between the set of integer partitions and {2,3,4,...}. Explanation on the example n=10. Write 2*n = 20 as a binary number: 10100. Consider a Ferrers board whose southeast border is obtained by replacing each 1 by an east step and each 0 by a north step. We obtain the Ferrers board of the partition p = (2,2,1). Finally, a(10) = 2'*2'*1', where m' = m-th prime. Thus, a(10)= 3*3*2 = 18. - Emeric Deutsch, Sep 17 2016

Crossrefs

Inverse: A253564.
Cf. A252737 (row sums), A252738 (row products).

Programs

  • Maple
    a:= proc(n) local m; m:= n; [0]; while m>0 do `if`(1=
          irem(m, 2, 'm'), map(x-> x+1, %), [%[], 0]) od:
          `if`(n=0, 1, mul(ithprime(i), i=%))
        end:
    seq(a(n), n=0..100);  # Alois P. Heinz, Aug 23 2017
  • Mathematica
    p[n_] := p[n] = FactorInteger[n][[-1, 1]];
    b[n_] := n p[n];
    c[1] = 1; c[n_] := (n/p[n]) NextPrime[p[n]];
    a[0] = 1; a[1] = 2; a[n_] := a[n] = If[EvenQ[n], b[a[n/2]], c[a[(n-1)/2]]];
    a /@ Range[0, 100] (* Jean-François Alcover, Feb 15 2021 *)

Formula

a(0) = 1, a(1) = 2; after which, a(2n) = A253560(a(n)), a(2n+1) = A253550(a(n)).
As a composition of other permutations:
a(n) = A122111(A005940(n+1)).
a(n) = A253565(A054429(n)).
Other identities and observations. For all n >= 0:
A002110(n) = a(A002450(n)). [Primorials occur at positions (4^n - 1)/3.]
For all n >= 1: a(2n) - a(2n+1) > 0. [See the comment above.]

A253890 a(n) = A253560(A253883(n)) = A122111((2*A122111(n)) - 1).

Original entry on oeis.org

1, 4, 16, 8, 18, 32, 2048, 9, 128, 512, 100, 256, 2147483648, 32768, 54, 64, 1200, 1024, 10616832, 144, 1048576, 864, 43200, 25, 65536, 8796093022208, 81, 4194304, 644972544, 131072, 7260, 36, 486, 75557863725914323419136, 268435456, 8192
Offset: 1

Views

Author

Antti Karttunen, Jan 17 2015

Keywords

Comments

Conjugate the partition defined by the prime factorization of n (see, e.g., table A112798 or A241918), resulting k = A122111(n), then take the k-th odd number (2k-1), and conjugate again, giving a(n) = A122111(2k-1).
Thus after a(1)=1, this is a permutation of A070003 (numbers divisible by the square of their largest prime factor).
When A122111 is represented as a binary tree, then node A122111(t > 1) = n has as its left child A122111(2t-1) = a(n).

Crossrefs

Cf. A070003 (same sequence without 1, sorted into ascending order).
Cf. also A112798 and A241918.

Formula

a(n) = A122111((2*A122111(n)) - 1) = A122111(A005408(A122111(n) - 1)).
a(n) = A253560(A253883(n)).

A387406 Numbers k such that sigma(A253560(k)) / A253560(k) is equal to (sigma(k)+1) / k, where A253560(k) = k multiplied by its largest prime factor.

Original entry on oeis.org

6, 18, 28, 54, 117, 162, 196, 486, 496, 775, 1372, 1458, 1521, 4374, 8128, 9604, 13122, 15376, 19773, 24025, 39366, 67228, 88723, 118098, 257049, 354294, 470596, 476656, 744775, 796797, 1032256, 1062882, 2896363, 3188646, 3294172, 3341637, 6725201, 9565938, 12326221, 14776336, 23059204, 23088025, 25774633, 27237961
Offset: 1

Views

Author

Antti Karttunen, Aug 30 2025

Keywords

Comments

Terms k for which sigma(k/A053585(k)) = A006530(k). This further entails that A001221(k) = 2 [See A023194].

Crossrefs

Subsequences: A000396 (even terms only), A240991 (conjectured, if true, then A000396 has only even terms).

Programs

  • Mathematica
    fk[k_]:=k*FactorInteger[k][[-1,1]];Select[Range[10^6],DivisorSigma[1,fk[#]]/fk[#]==(DivisorSigma[1,#]+1)/#&] (* James C. McMahon, Aug 31 2025 *)
  • PARI
    A253560(n) = if (n==1, 1, n*vecmax(factor(n)[, 1]));
    isA387406(n) = { my(x=A253560(n)); ((sigma(x)/x) == ((sigma(n)+1)/n)); };

A052126 a(1) = 1; for n>1, a(n)=n/(largest prime dividing n).

Original entry on oeis.org

1, 1, 1, 2, 1, 2, 1, 4, 3, 2, 1, 4, 1, 2, 3, 8, 1, 6, 1, 4, 3, 2, 1, 8, 5, 2, 9, 4, 1, 6, 1, 16, 3, 2, 5, 12, 1, 2, 3, 8, 1, 6, 1, 4, 9, 2, 1, 16, 7, 10, 3, 4, 1, 18, 5, 8, 3, 2, 1, 12, 1, 2, 9, 32, 5, 6, 1, 4, 3, 10, 1, 24, 1, 2, 15, 4, 7, 6, 1, 16, 27, 2, 1, 12, 5, 2, 3, 8, 1, 18, 7, 4, 3, 2, 5, 32, 1
Offset: 1

Views

Author

James Sellers, Jan 21 2000

Keywords

Comments

For n>1, a(n)=1 if and only if n is prime. - Zak Seidov, Feb 09 2015
For n > 1, a(n) is the smallest divisor of n such that n/a(n) is prime. - David James Sycamore, Jan 03 2024

Examples

			a(15) = 15/(largest prime dividing 15) = 15/5 = 3.
		

Crossrefs

Left inverse of A253560.

Programs

  • Maple
    a := n -> `if`(n=1, 1, n/max(numtheory[factorset](n)));
    seq(a(n), n=1..97); # Peter Luschny, Jul 28 2014
  • Mathematica
    a052126[n_] := Array[If[n == 1, 1, #/FactorInteger[#][[-1]][[1]]] &, n]; a052126[97] (* Michael De Vlieger, Dec 21 2014 *)
  • PARI
    gpf(n)=my(f=factor(n)[,1]); f[#f]
    a(n)=if(n<4,return(1)); n/gpf(n) \\ Charles R Greathouse IV, Apr 28 2015

Formula

a(n) = n/A006530(n).
a(n) = A130065(n)/A020639(n). - Reinhard Zumkeller, May 05 2007
a(A002110(n)) = A002110(n-1), a(p^k) = p^(k-1), p any prime; k >= 1. - David James Sycamore, Jan 03 2024
a(n) = n - A171462(n). - Antti Karttunen, Jan 04 2024

A253550 Shift one instance of the largest prime one step towards larger primes: a(1) = 1, for n>1: a(n) = (n / prime(g)) * prime(g+1), where g = A061395(n), index of the greatest prime dividing n.

Original entry on oeis.org

1, 3, 5, 6, 7, 10, 11, 12, 15, 14, 13, 20, 17, 22, 21, 24, 19, 30, 23, 28, 33, 26, 29, 40, 35, 34, 45, 44, 31, 42, 37, 48, 39, 38, 55, 60, 41, 46, 51, 56, 43, 66, 47, 52, 63, 58, 53, 80, 77, 70, 57, 68, 59, 90, 65, 88, 69, 62, 61, 84, 67, 74, 99, 96, 85, 78, 71, 76, 87, 110, 73, 120, 79, 82, 105, 92, 91, 102, 83, 112, 135, 86, 89
Offset: 1

Views

Author

Antti Karttunen, Jan 03 2015

Keywords

Crossrefs

Inverse: A252462.
Cf. A102750 (same terms, but with 2 instead of 1, sorted into ascending order).

Programs

Formula

a(1) = 1; for n>1: a(n) = A065091(A061395(n)) * A052126(n).
Other identities. For all n >= 1:
A252462(a(n)) = n. [A252462 works as an inverse function for this injection.]
a(n) <= A253560(n).

A285109 a(n) = n multiplied by its smallest prime factor; a(1) = 1.

Original entry on oeis.org

1, 4, 9, 8, 25, 12, 49, 16, 27, 20, 121, 24, 169, 28, 45, 32, 289, 36, 361, 40, 63, 44, 529, 48, 125, 52, 81, 56, 841, 60, 961, 64, 99, 68, 175, 72, 1369, 76, 117, 80, 1681, 84, 1849, 88, 135, 92, 2209, 96, 343, 100, 153, 104, 2809, 108, 275, 112, 171, 116, 3481, 120, 3721, 124, 189, 128, 325, 132, 4489, 136, 207
Offset: 1

Views

Author

Antti Karttunen, Apr 19 2017

Keywords

Crossrefs

Differs from A065642 for the first time at n=12. See A284342 for all the differing points.

Programs

  • Mathematica
    a[n_] := n * FactorInteger[n][[1, 1]]; Array[a, 100] (* Amiram Eldar, Jun 30 2022 *)
  • PARI
    a(n)=if(n==1, 1, n*factor(n)[1,1]); \\ Joerg Arndt, Oct 27 2021
  • Scheme
    (define (A285109 n) (* (A020639 n) n))
    

Formula

a(n) = A020639(n) * n.
Other identities. For all n >= 1:
a(A285100(n)) = A065642(A285100(n)). [Agrees with A065642 on all terms of A285100, but not on any other points.]

A323247 a(n) = A005187(A156552(n)).

Original entry on oeis.org

0, 1, 3, 4, 7, 8, 15, 11, 10, 16, 31, 19, 63, 32, 18, 26, 127, 23, 255, 35, 34, 64, 511, 42, 22, 128, 25, 67, 1023, 39, 2047, 57, 66, 256, 38, 50, 4095, 512, 130, 74, 8191, 71, 16383, 131, 41, 1024, 32767, 89, 46, 47, 258, 259, 65535, 54, 70, 138, 514, 2048, 131071, 82, 262143, 4096, 73, 120, 134, 135, 524287, 515
Offset: 1

Views

Author

Antti Karttunen, Jan 10 2019

Keywords

Crossrefs

Programs

Formula

a(n) = A005187(A156552(n)).
a(n) = A323243(n) + A323248(n).
For n >= 2, a(A253560(n)) = a(n*A006530(n)) = a(n) + A000225(A001222(n)).
For n >= 1 and k >= 1, a(n*A000040(k+A000720(A006530(n)))) = a(n) + A000225(k+A001222(n)).

A253561 Square array read by antidiagonals: A(row,col) = A122111(A246278(row,col)).

Original entry on oeis.org

2, 3, 4, 6, 9, 8, 5, 18, 27, 16, 12, 25, 54, 81, 32, 10, 36, 125, 162, 243, 64, 24, 50, 108, 625, 486, 729, 128, 7, 72, 250, 324, 3125, 1458, 2187, 256, 15, 49, 216, 1250, 972, 15625, 4374, 6561, 512, 20, 75, 343, 648, 6250, 2916, 78125, 13122, 19683, 1024, 48, 100, 375, 2401, 1944, 31250, 8748, 390625, 39366, 59049, 2048, 14, 144, 500, 1875, 16807, 5832, 156250, 26244, 1953125, 118098, 177147, 4096
Offset: 2

Views

Author

Antti Karttunen, Jan 03 2015

Keywords

Comments

If we assume here that a(1) = 1 (but which is not explicitly included because outside of the array), then A253562 gives the inverse permutation.
The top row A253568 contains the same terms as A102750, but in different order.

Examples

			The top left corner of the array:
   2,  3,   6,   5,   12,   10,   24,    7,   15,   20,  48,   14,  96,   40,
   4,  9,  18,  25,   36,   50,   72,   49,   75,  100, 144,   98, 288,  200,
   8, 27,  54, 125,  108,  250,  216,  343,  375,  500, 432,  686, 864, 1000,
  16, 81, 162, 625,  324, 1250,  648, 2401, 1875, 2500,1296, 4802,2592, 5000,
  32,243, 486,3125,  972, 6250, 1944,16807, 9375,12500,3888,33614,7776,25000,
...
		

Crossrefs

Inverse: A253562.
The leftmost column: A000079. Topmost row: A253568.

Programs

Formula

a(n) = A122111(A246278(n)). [As a linear sequence].
Other identities.
A071178(A(row,col)) = row for all col. [All terms on row k have k as the exponent of their largest prime factor.]
A253560(A(row,col)) = A(row+1,col). [For any n >= 2, A253560(n) gives the term which is immediately below n in the same column of this array.]

A336321 a(n) = A122111(A225546(n)).

Original entry on oeis.org

1, 2, 3, 4, 7, 5, 19, 6, 9, 11, 53, 10, 131, 23, 13, 8, 311, 15, 719, 22, 29, 59, 1619, 14, 49, 137, 21, 46, 3671, 17, 8161, 12, 61, 313, 37, 25, 17863, 727, 139, 26, 38873, 31, 84017, 118, 39, 1621, 180503, 20, 361, 77, 317, 274, 386093, 33, 71, 58, 733, 3673, 821641, 34, 1742537, 8167, 87, 18, 151, 67, 3681131, 626, 1627, 41, 7754077, 35, 16290047
Offset: 1

Views

Author

Antti Karttunen and Peter Munn, Jul 17 2020

Keywords

Comments

A122111 and A225546 are both self-inverse permutations of the positive integers based on prime factorizations, and they share further common properties. For instance, they map the prime numbers to powers of 2: A122111 maps the k-th prime to 2^k, whereas A225546 maps it to 2^2^(k-1).
In composing these permutations, this sequence maps the squarefree numbers, as listed in A019565, to the prime numbers in increasing order; and the list of powers of 2 to the "normal" numbers (A055932), as listed in A057335.

Examples

			From _Peter Munn_, Jan 04 2021: (Start)
In this set of examples we consider [a(n)] as a function a(.) with an inverse, a^-1(.).
First, a table showing mapping of the powers of 2:
  n     a^-1(2^n) =    2^n =        a(2^n) =
        A001146(n-1)   A000079(n)   A057335(n)
  0             (1)         1            1
  1               2         2            2
  2               4         4            4
  3              16         8            6
  4             256        16            8
  5           65536        32           12
  6      4294967296        64           18
  ...
Next, a table showing mapping of the squarefree numbers, as listed in A019565 (a lexicographic ordering by prime factors):
  n   a^-1(A019565(n))   A019565(n)      a(A019565(n))   a^2(A019565(n))
      Cf. {A337533}      Cf. {A005117}   = prime(n)      = A033844(n-1)
  0              1               1             (1)               (1)
  1              2               2               2                 2
  2              3               3               3                 3
  3              8               6               5                 7
  4              6               5               7                19
  5             12              10              11                53
  6             18              15              13               131
  7            128              30              17               311
  8              5               7              19               719
  9             24              14              23              1619
  ...
As sets, the above columns are A337533, A005117, A008578, {1} U A033844.
Similarly, we get bijections between sets A000290\{0} -> {1} U A070003; and {1} U A335740 -> A005408 -> A066207.
(End)
		

Crossrefs

A122111 composed with A225546.
Cf. A336322 (inverse permutation).
Other sequences used in a definition of this sequence: A000040, A000188, A019565, A248663, A253550, A253560.
Sequences used to express relationship between terms of this sequence: A003159, A003961, A297002, A334747.
Cf. A057335.
A mapping between the binary tree sequences A334866 and A253563.
Lists of sets (S_1, S_2, ... S_j) related by the bijection defined by the sequence: (A000290\{0}, {1} U A070003), ({1} U A001146, A000079, A055932), ({1} U A335740, A005408, A066207), (A337533, A005117, A008578, {1} U A033844).

Formula

a(n) = A122111(A225546(n)).
Alternative definition: (Start)
Write n = m^2 * A019565(j), where m = A000188(n), j = A248663(n).
a(1) = 1; otherwise for m = 1, a(n) = A000040(j), for m > 1, a(n) = A253550^j(A253560(a(m))).
(End)
a(A000040(m)) = A033844(m-1).
a(A001146(m)) = 2^(m+1).
a(2^n) = A057335(n).
a(n^2) = A253560(a(n)).
For n in A003159, a(2n) = b(a(n)), where b(1) = 2, b(n) = A253550(n), n >= 2.
More generally, a(A334747(n)) = b(a(n)).
a(A003961(n)) = A297002(a(n)).
a(A334866(m)) = A253563(m).
Showing 1-10 of 20 results. Next