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

A246679 Permutation of natural numbers, even bisection of A246675 halved: a(n) = A246675(2*n)/2.

Original entry on oeis.org

1, 2, 4, 3, 8, 16, 5, 32, 64, 9, 128, 6, 7, 256, 512, 13, 10, 1024, 21, 2048, 4096, 11, 8192, 12, 25, 16384, 18, 33, 32768, 65536, 19, 26, 131072, 37, 262144, 524288, 17, 20, 1048576, 15, 2097152, 42, 45, 4194304, 36, 57, 50, 8388608, 27, 16777216, 33554432, 29, 67108864, 134217728, 61, 268435456, 66, 43, 52, 24, 73, 14
Offset: 1

Views

Author

Antti Karttunen, Sep 02 2014

Keywords

Comments

Equally: even bisection of A246677 halved.

Crossrefs

Inverse: A246680.
a(n) differs from A244153(n+1) for the first time at n=16, where a(16) = 13, while A244153(17) = 17.

Programs

Formula

a(n) = A246675(2*n)/2.
a(n) = A246677(2*n)/2.

A064989 Multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p.

Original entry on oeis.org

1, 1, 2, 1, 3, 2, 5, 1, 4, 3, 7, 2, 11, 5, 6, 1, 13, 4, 17, 3, 10, 7, 19, 2, 9, 11, 8, 5, 23, 6, 29, 1, 14, 13, 15, 4, 31, 17, 22, 3, 37, 10, 41, 7, 12, 19, 43, 2, 25, 9, 26, 11, 47, 8, 21, 5, 34, 23, 53, 6, 59, 29, 20, 1, 33, 14, 61, 13, 38, 15, 67, 4, 71, 31, 18, 17, 35, 22, 73, 3, 16
Offset: 1

Views

Author

Vladeta Jovovic, Oct 30 2001

Keywords

Comments

From Antti Karttunen, May 12 2014: (Start)
a(A003961(n)) = n for all n. [This is a left inverse function for the injection A003961.]
Bisections are A064216 (the terms at odd indices) and A064989 itself (the terms at even indices), i.e., a(2n) = a(n) for all n.
(End)
From Antti Karttunen, Dec 18-21 2014: (Start)
When n represents an unordered integer partition via the indices of primes present in its prime factorization (for n >= 2, n corresponds to the partition given as the n-th row of A112798) this operation subtracts one from each part. If n is of the form 2^k (a partition having just k 1's as its parts) the result is an empty partition (which is encoded by 1, having an "empty" factorization).
For all odd numbers n >= 3, a(n) tells which number is located immediately above n in square array A246278. Cf. also A246277.
(End)
Alternatively, if numbers are represented as the multiset of indices of prime factors with multiplicity, this operation subtracts 1 from each element and discards the 0's. - M. F. Hasler, Dec 29 2014

Examples

			a(20) = a(2^2*5) = a(2^2)*a(5) = prevprime(5) = 3.
		

Crossrefs

Cf. A064216 (odd bisection), A003961 (inverse), A151799.
Other sequences whose definition involve or are some other way related with this sequence: A105560, A108951, A118306, A122111, A156552, A163511, A200746, A241909, A243070, A243071, A243072, A243073, A244319, A245605, A245607, A246165, A246266, A246268, A246277, A246278, A246361, A246362, A246371, A246372, A246373, A246374, A246376, A246380, A246675, A246682, A249745, A250470.
Similar prime-shifts towards smaller numbers: A252461, A252462, A252463.

Programs

  • Haskell
    a064989 1 = 1
    a064989 n = product $ map (a008578 . a049084) $ a027746_row n
    -- Reinhard Zumkeller, Apr 09 2012
    (MIT/GNU Scheme, with Aubrey Jaffer's SLIB Scheme library)
    (require 'factor)
    (define (A064989 n) (if (= 1 n) n (apply * (map (lambda (k) (if (zero? k) 1 (A000040 k))) (map -1+ (map A049084 (factor n)))))))
    ;; Antti Karttunen, May 12 2014
    (definec (A064989 n) (if (= 1 n) n (* (A008578 (A055396 n)) (A064989 (A032742 n))))) ;; One based on given recurrence and utilizing memoizing definec-macro.
    (definec (A064989 n) (cond ((= 1 n) n) ((even? n) (A064989 (/ n 2))) (else (A163511 (/ (- (A243071 n) 1) 2))))) ;; Corresponds to one of the alternative formulas, but is very unpractical way to compute this sequence. - Antti Karttunen, Dec 18 2014
    
  • Maple
    q:= proc(p) prevprime(p) end proc: q(2):= 1:
    [seq(mul(q(f[1])^f[2], f = ifactors(n)[2]), n = 1 .. 1000)]; # Robert Israel, Dec 21 2014
  • Mathematica
    Table[Times @@ Power[Which[# == 1, 1, # == 2, 1, True, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger@ n, {n, 81}] (* Michael De Vlieger, Jan 04 2016 *)
  • PARI
    { for (n=1, 1000, f=factor(n)~; a=1; j=1; if (n>1 && f[1, 1]==2, j=2); for (i=j, length(f), a*=precprime(f[1, i] - 1)^f[2, i]); write("b064989.txt", n, " ", a) ) } \\ Harry J. Smith, Oct 02 2009
    
  • PARI
    a(n) = {my(f = factor(n)); for (i=1, #f~, if ((p=f[i,1]) % 2, f[i,1] = precprime(p-1), f[i,1] = 1);); factorback(f);} \\ Michel Marcus, Dec 18 2014
    
  • PARI
    A064989(n)=factorback(Mat(apply(t->[max(precprime(t[1]-1),1),t[2]],Vec(factor(n)~))~)) \\ M. F. Hasler, Dec 29 2014
    
  • Python
    from sympy import factorint, prevprime
    from operator import mul
    from functools import reduce
    def a(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f])
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 15 2017
    
  • Python
    from math import prod
    from sympy import prevprime, factorint
    def A064989(n): return prod(prevprime(p)**e for p, e in  factorint(n>>(~n&n-1).bit_length()).items()) # Chai Wah Wu, Jan 05 2023

Formula

From Antti Karttunen, Dec 18 2014: (Start)
If n = product A000040(k)^e(k) then a(n) = product A008578(k)^e(k) [where A000040(n) gives the n-th prime, and A008578(n) gives 1 for 1 and otherwise the (n-1)-th prime].
a(1) = 1; for n > 1, a(n) = A008578(A055396(n)) * a(A032742(n)). [Above formula represented as a recurrence. Cf. A252461.]
a(1) = 1; for n > 1, a(n) = A008578(A061395(n)) * a(A052126(n)). [Compare to the formula of A252462.]
This prime-shift operation is used in the definitions of many other sequences, thus it can be expressed in many alternative ways:
a(n) = A200746(n) / n.
a(n) = A242424(n) / A105560(n).
a(n) = A122111(A122111(n)/A105560(n)) = A122111(A052126(A122111(n))). [In A112798-partition context: conjugate, remove the largest part (the largest prime factor), and conjugate again.]
a(1) = 1; for n > 1, a(2n) = a(n), a(2n+1) = A163511((A243071(2n+1)-1) / 2).
a(n) = A249818(A250470(A249817(n))). [A250470 is an analogous operation for "going one step up" in the square array A083221 (A083140).]
(End)
Product_{k=1..n} a(k) = n! / A307035(n). - Vaclav Kotesovec, Mar 21 2019
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2-p)/(p^2-q(p))) = 0.220703928... , where q(p) = prevprime(p) (A151799) if p > 2 and q(2) = 1. - Amiram Eldar, Nov 18 2022

A246277 Column index of n in A246278: a(1) = 0, a(2n) = n, a(2n+1) = a(A064989(2n+1)).

Original entry on oeis.org

0, 1, 1, 2, 1, 3, 1, 4, 2, 5, 1, 6, 1, 7, 3, 8, 1, 9, 1, 10, 5, 11, 1, 12, 2, 13, 4, 14, 1, 15, 1, 16, 7, 17, 3, 18, 1, 19, 11, 20, 1, 21, 1, 22, 6, 23, 1, 24, 2, 25, 13, 26, 1, 27, 5, 28, 17, 29, 1, 30, 1, 31, 10, 32, 7, 33, 1, 34, 19, 35, 1, 36, 1, 37, 9, 38, 3, 39, 1, 40, 8, 41, 1, 42
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Comments

If n >= 2, n occurs in column a(n) of A246278.
By convention, a(1) = 0 because 1 does not occur in A246278.

Crossrefs

Terms of A348717 halved. A305897 is the restricted growth sequence transform.
Positions of terms 1 .. 8 in this sequence are given by the following sequences: A000040, A001248, A006094, A030078, A090076, A251720, A090090, A030514.
Cf. A078898 (has the same role with array A083221 as this sequence has with A246278).
This sequence is also used in the definition of the following permutations: A246274, A246276, A246675, A246677, A246683, A249815, A249817 (A249818), A249823, A249825, A250244, A250245, A250247, A250249.
Also in the definition of arrays A249821, A251721, A251722.
Sum of prime indices of a(n) is A359358(n) + A001222(n) - 1, cf. A326844.
A112798 lists prime indices, length A001222, sum A056239.

Programs

  • Mathematica
    a246277[n_Integer] := Module[{f, p, a064989, a},
      f[x_] := Transpose@FactorInteger[x];
      p[x_] := Which[
        x == 1, 1,
        x == 2, 1,
        True, NextPrime[x, -1]];
      a064989[x_] := Times @@ Power[p /@ First[f[x]], Last[f[x]]];
      a[1] = 0;
      a[x_] := If[EvenQ[x], x/2, NestWhile[a064989, x, OddQ]/2];
    a/@Range[n]]; a246277[84] (* Michael De Vlieger, Dec 19 2014 *)
  • PARI
    A064989(n) = {my(f); f = factor(n); if((n>1 && f[1,1]==2), f[1,2] = 0); for (i=1, #f~, f[i,1] = precprime(f[i,1]-1)); factorback(f)};
    A246277(n) = { if(1==n, 0, while((n%2), n = A064989(n)); (n/2)); };
    
  • PARI
    A246277(n) = if(1==n, 0, my(f = factor(n), k = primepi(f[1,1])-1); for (i=1, #f~, f[i,1] = prime(primepi(f[i,1])-k)); factorback(f)/2); \\ Antti Karttunen, Apr 30 2022
    
  • Python
    from sympy import factorint, prevprime
    from operator import mul
    from functools import reduce
    def a064989(n):
        f=factorint(n)
        return 1 if n==1 else reduce(mul, [1 if i==2 else prevprime(i)**f[i] for i in f])
    def a(n): return 0 if n==1 else n//2 if n%2==0 else a(a064989(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 15 2017
  • Scheme
    ;; two different variants, the second one employing memoizing definec-macro)
    (define (A246277 n) (if (= 1 n) 0 (let loop ((n n)) (if (even? n) (/ n 2) (loop (A064989 n))))))
    (definec (A246277 n) (cond ((= 1 n) 0) ((even? n) (/ n 2)) (else (A246277 (A064989 n)))))
    

Formula

a(1) = 0, a(2n) = n, a(2n+1) = a(A064989(2n+1)) = a(A064216(n+1)). [Cf. the formula for A252463.]
Instead of the equation for a(2n+1) above, we may write a(A003961(n)) = a(n). - Peter Munn, May 21 2022
Other identities. For all n >= 1, the following holds:
For all w >= 0, a(p_{i} * p_{j} * ... * p_{k}) = a(p_{i+w} * p_{j+w} * ... * p_{k+w}).
For all n >= 2, A001222(a(n)) = A001222(n)-1. [a(n) has one less prime factor than n. Thus each semiprime (A001358) is mapped to some prime (A000040), etc.]
For all n >= 2, a(n) = A078898(A249817(n)).
For semiprimes n = p_i * p_j, j >= i, a(n) = A000040(1+A243055(n)) = p_{1+j-i}.
a(n) = floor(A348717(n)/2). - Antti Karttunen, Apr 30 2022
If n has prime factorization Product_{i=1..k} prime(x_i), then a(n) = Product_{i=2..k} prime(x_i-x_1+1). The opposite version is A358195, prime indices A358172, even bisection A241916. - Gus Wiseman, Dec 29 2022

A246278 Prime shift array: Square array read by antidiagonals: A(1,col) = 2*col, and for row > 1, A(row,col) = A003961(A(row-1,col)).

Original entry on oeis.org

2, 4, 3, 6, 9, 5, 8, 15, 25, 7, 10, 27, 35, 49, 11, 12, 21, 125, 77, 121, 13, 14, 45, 55, 343, 143, 169, 17, 16, 33, 175, 91, 1331, 221, 289, 19, 18, 81, 65, 539, 187, 2197, 323, 361, 23, 20, 75, 625, 119, 1573, 247, 4913, 437, 529, 29, 22, 63, 245, 2401, 209, 2873, 391, 6859, 667, 841, 31
Offset: 2

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Comments

The array is read by antidiagonals: A(1,1), A(1,2), A(2,1), A(1,3), A(2,2), A(3,1), etc.
This array can be obtained by taking every second column from array A242378, starting from its column 2.
Permutation of natural numbers larger than 1.
The terms on row n are all divisible by n-th prime, A000040(n).
Each column is strictly growing, and the terms in the same column have the same prime signature.
A055396(n) gives the row number of row where n occurs,
and A246277(n) gives its column number, both starting from 1.
From Antti Karttunen, Jan 03 2015: (Start)
A252759(n) gives their sum minus one, i.e. the Manhattan distance of n from the top left corner.
If we assume here that a(1) = 1 (but which is not explicitly included because outside of the array), then A252752 gives the inverse permutation. See also A246276.
(End)

Examples

			The top left corner of the array:
   2,     4,     6,     8,    10,    12,    14,    16,    18, ...
   3,     9,    15,    27,    21,    45,    33,    81,    75, ...
   5,    25,    35,   125,    55,   175,    65,   625,   245, ...
   7,    49,    77,   343,    91,   539,   119,  2401,   847, ...
  11,   121,   143,  1331,   187,  1573,   209, 14641,  1859, ...
  13,   169,   221,  2197,   247,  2873,   299, 28561,  3757, ...
		

Crossrefs

First row: A005843 (the even numbers), from 2 onward.
Row 2: A249734, Row 3: A249827.
Column 1: A000040 (primes), Column 2: A001248 (squares of primes), Column 3: A006094 (products of two successive primes), Column 4: A030078 (cubes of primes).
Transpose: A246279.
Inverse permutation: A252752.
One more than A246275.
Arrays obtained by applying a particular function (given in parentheses) to the entries of this array. Cases where the columns grow monotonically are indicated with *: A249822 (A078898), A253551 (* A156552), A253561 (* A122111), A341605 (A017665), A341606 (A017666), A341607 (A006530 o A017666), A341608 (A341524), A341626 (A341526), A341627 (A341527), A341628 (A006530 o A341527), A342674 (A341530), A344027 (* A003415, arithmetic derivative), A355924 (A342671), A355925 (A009194), A355926 (A355442), A355927 (* sigma), A356155 (* A258851), A372562 (A252748), A372563 (A286385), A378979 (* deficiency, A033879), A379008 (* (probably), A294898), A379010 (* A000010, Euler phi), A379011 (* A083254).
Cf. A329050 (subtable).

Programs

  • Mathematica
    f[p_?PrimeQ] := f[p] = Prime[PrimePi@ p + 1]; f[1] = 1; f[n_] := f[n] = Times @@ (f[First@ #]^Last@ # &) /@ FactorInteger@ n; Block[{lim = 12}, Table[#[[n - k, k]], {n, 2, lim}, {k, n - 1, 1, -1}] &@ NestList[Map[f, #] &, Table[2 k, {k, lim}], lim]] // Flatten (* Michael De Vlieger, Jan 04 2016, after Jean-François Alcover at A003961 *)
  • Scheme
    (define (A246278 n) (if (<= n 1) n (A246278bi (A002260 (- n 1)) (A004736 (- n 1))))) ;; Square array starts with offset=2, and we have also tacitly defined a(1) = 1 here.
    (define (A246278bi row col) (if (= 1 row) (* 2 col) (A003961 (A246278bi (- row 1) col))))

Formula

A(1,col) = 2*col, and for row > 1, A(row,col) = A003961(A(row-1,col)).
As a composition of other similar sequences:
a(n) = A122111(A253561(n)).
a(n) = A249818(A083221(n)).
For all n >= 1, a(n+1) = A005940(1+A253551(n)).
A(n, k) = A341606(n, k) * A355925(n, k). - Antti Karttunen, Jul 22 2022

Extensions

Starting offset of the linear sequence changed from 1 to 2, without affecting the column and row indices by Antti Karttunen, Jan 03 2015

A135764 Distribute the natural numbers in columns based on the occurrence of "2" in each prime factorization; square array A(row,col) = 2^(row-1) * ((2*col)-1), read by descending antidiagonals.

Original entry on oeis.org

1, 3, 2, 5, 6, 4, 7, 10, 12, 8, 9, 14, 20, 24, 16, 11, 18, 28, 40, 48, 32, 13, 22, 36, 56, 80, 96, 64, 15, 26, 44, 72, 112, 160, 192, 128, 17, 30, 52, 88, 144, 224, 320, 384, 256, 19, 34, 60, 104, 176, 288, 448, 640, 768, 512, 21, 38, 68, 120, 208, 352, 576, 896, 1280, 1536, 1024, 23, 42, 76, 136, 240, 416, 704, 1152, 1792, 2560, 3072, 2048, 25, 46, 84, 152, 272, 480, 832, 1408, 2304, 3584, 5120, 6144, 4096, 27, 50, 92, 168, 304, 544, 960, 1664, 2816
Offset: 1

Views

Author

Alford Arnold, Nov 29 2007

Keywords

Comments

The array in A135764 is identical to the array in A054582 [up to the transposition and different indexing. - Clark Kimberling, Dec 03 2010; comment amended by Antti Karttunen, Feb 03 2015; please see the illustration in Example section].
The array gives a bijection between the natural numbers N and N^2. A more usual bijection is to take the natural numbers A000027 and write them in the usual OEIS square array format. However this bijection has the advantage that it can be formed by iterating the usual bijection between N and 2N. - Joshua Zucker, Nov 04 2011
The array can be used to determine the configurations of k-th Towers of Hanoi moves, by labeling odd row terms C,B,A,C,B,A,... and even row terms B,C,A,B,C,A,.... Then given k equal to or greater than term "a" in each n-th row, but less than the next row term, record the label A, B, or C for term "a". This denotes the peg position for the disc corresponding to the n-th row. For example, with k = 25, five discs are in motion since the binary for 25 = 11001, five bits. We find that 25 in row 5 is greater than 16 labeled C, but less than 48. Thus, disc 5 is on peg C. In the 4th row, 25 is greater than 24 (a C), but less than 40, so goes onto the C peg. Similarly, disc 3 is on A, 2 is on A, and disc 1 is on A. Thus, discs 2 and 3 are on peg A, while 1, 4, and 5 are on peg C. - Gary W. Adamson, Jun 22 2012
Shares with arrays A253551 and A254053 the property that A001511(n) = k for all terms n on row k and when going downward in each column, terms grow by doubling. - Antti Karttunen, Feb 03 2015
Let P be the infinite palindromic word having initial word 0 and midword sequence (1,2,3,4,...) = A000027. Row n of the array A135764 gives the positions of n-1 in S. ("Infinite palindromic word" is defined at A260390.) - Clark Kimberling, Aug 13 2015
The probability distribution series 1 = 2/3 + 4/15 + 16/255 + 256/65535 + ... + A001146(n-1)/A051179(n) governs the proportions of terms in A001511 from row n of the array. In A001511(1..15) there are ((2/3) * 15) = ten terms from row one of the array, ((4/15) * 15) = four terms from row two, and ((16/255) * 15) = one (rounded), giving one term from row three (a 4). - Gary W. Adamson, Dec 16 2021
From Gary W. Adamson, Dec 30 2021: (Start)
Subarrays representing the number of divisors of an integer can be mapped on the table. For 60, write the odd divisors on the top row: 1, 3, 5, 15. Since 60 has 12 divisors, let the left column equal 1, 2, 4, where 4 is the highest power of 2 dividing 60. Multiplying top row terms by left column terms, we get the result:
1 3 5 15
2 6 10 30
4 12 20 60. (End)

Examples

			The table begins
   1,  3,   5,   7,   9,  11,  13,  15,  17,  19,  21,  23, ...
   2,  6,  10,  14,  18,  22,  26,  30,  34,  38,  42,  46, ...
   4, 12,  20,  28,  36,  44,  52,  60,  68,  76,  84,  92, ...
   8, 24,  40,  56,  72,  88, 104, 120, 136, 152, 168, 184, ...
  16, 48,  80, 112, 144, 176, 208, 240, 272, 304, 336, 368, ...
  32, 96, 160, 224, 288, 352, 416, 480, 544, 608, 672, 736, ...
etc.
For n = 6, we have [A002260(6), A004736(6)] = [3, 1] (i.e., 6 corresponds to location 3,1 (row,col) in above table) and A(3,1) = A000079(3-1) * A005408(1-1) = 2^2 * 1 = 4.
For n = 13, we have [A002260(13), A004736(13)] = [3, 3] (13 corresponds to location 3,3 (row,col) in above table) and A(3,3) = A000079(3-1) * A005408(3-1) = 2^2 * 5 = 20.
For n = 23, we have [A002260(23), A004736(23)] = [2, 6] (23 corresponds to location 2,6) and A(2,6) = A000079(2-1) * A005408(6-1) = 2^1 * 11 = 22.
		

Crossrefs

Transpose: A054582.
Inverse permutation: A249725.
Column 1: A000079.
Row 1: A005408.
Cf. A001511 (row index), A003602 (column index, both one-based).
Related arrays: A135765, A253551, A254053, A254055.
Cf. also permutations A246675, A246676, A249741, A249811, A249812.
Cf. A260390.

Programs

  • Maple
    seq(seq(2^(j-1)*(2*(i-j)+1),j=1..i),i=1..20); # Robert Israel, Feb 03 2015
  • Mathematica
    f[n_] := Block[{i, j}, {1}~Join~Flatten@ Last@ Reap@ For[j = 1, j <= n, For[i = j, i > 0, Sow[2^(j - i - 1)*(2 i + 1)], i--], j++]]; f@ 10 (* Michael De Vlieger, Feb 03 2015 *)
  • PARI
    a(n) = {s = ceil((1 + sqrt(1 + 8*n)) / 2); r = n - binomial(s-1, 2) - 1;k = s - r - 2; 2^r * (2 * k + 1) } \\ David A. Corneth, Feb 05 2015
  • Scheme
    (define (A135764 n) (A135764bi (A002260 n) (A004736 n)))
    (define (A135764bi row col) (* (A000079 (- row 1)) (+ -1 col col)))
    ;; Antti Karttunen, Feb 03 2015
    

Formula

From Antti Karttunen, Feb 03 2015: (Start)
A(row, col) = 2^(row-1) * ((2*col)-1) = A000079(row-1) * A005408(col-1).
A(row,col) = A064989(A135765(row,A249746(col))).
A(row,col) = A(row+1,col)/2 [discarding the topmost row and halving the rest of terms gives the array back].
A(row,col) = A(row,col+1) - A000079(row) [discarding the leftmost column and subtracting 2^{row number} from the rest of terms gives the array back].
(End)
G.f.: ((2*x+1)*Sum_{i>=0} 2^i*x^(i*(i+1)/2) + 2*(1-2*x)*Sum_{i>=0} i*x^(i*(i+1)/2) + (1-6*x)*Sum_{i>=0} x^(i*(i+1)/2) - 1 - 2*x)*x/(1-2*x)^2. These sums are related to Jacobi theta functions. - Robert Israel, Feb 03 2015

Extensions

More terms from Sean A. Irvine, Nov 23 2010
Name amended and the illustration of array in the example section transposed by Antti Karttunen, Feb 03 2015

A246676 Permutation of natural numbers: a(n) = A242378(A007814(n), (1+A000265(n))) - 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 6, 9, 14, 11, 24, 13, 26, 15, 10, 17, 20, 19, 34, 21, 44, 23, 48, 25, 32, 27, 124, 29, 80, 31, 12, 33, 74, 35, 54, 37, 62, 39, 76, 41, 38, 43, 174, 45, 134, 47, 120, 49, 50, 51, 64, 53, 98, 55, 342, 57, 104, 59, 624, 61, 242, 63, 16, 65, 56, 67, 244, 69, 224, 71, 90, 73, 68
Offset: 1

Views

Author

Antti Karttunen, Sep 01 2014

Keywords

Comments

To compute a(n) we shift its binary representation right as many steps k as necessary that the result were an odd number. Then one is added to that odd number, and the prime factorization of the resulting even number is shifted the same k number of steps towards larger primes, whose product is then decremented by one to get the final result.
In the essence, a(n) tells which number in array A246275 is at the same position where n is in the array A135764. As the topmost row in both arrays is A005408 (odd numbers), they are fixed, i.e. a(2n+1) = 2n+1 for all n.
Equally: a(n) tells which number in array A246273 is at the same position where n is in the array A054582, as they are the transposes of above two arrays.

Examples

			Consider n=36, "100100" in binary. It has to be shifted two bits right that the result were an odd number 9, "1001" in binary. We see that 9+1 = 10 = 2*5 = p_1 * p_3 [where p_k denotes the k-th prime, A000040(k)], and shifting this two steps towards larger primes results p_3 * p_5 = 5*11 = 55, thus a(36) = 55-1 = 54.
		

Crossrefs

Inverse: A246675.
Even bisection halved: A246680.
More recursed versions: A246678, A246684.
Other related permutations: A209268, A246273, A246275, A135764, A054582.

Programs

Formula

a(n) = A242378(A007814(n), (1+A000265(n))) - 1. [Where the bivariate function A242378(k,n) changes each prime p(i) in the prime factorization of n to p(i+k), i.e., it's the result of A003961 iterated k times starting from n].
As a composition of related permutations:
a(n) = A246273(A209268(n)).
Other identities:
For all n >= 0, a(A005408(n)) = A005408(n). [Fixes the odd numbers].

A246275 Square array A246278 minus 1.

Original entry on oeis.org

1, 3, 2, 5, 8, 4, 7, 14, 24, 6, 9, 26, 34, 48, 10, 11, 20, 124, 76, 120, 12, 13, 44, 54, 342, 142, 168, 16, 15, 32, 174, 90, 1330, 220, 288, 18, 17, 80, 64, 538, 186, 2196, 322, 360, 22, 19, 74, 624, 118, 1572, 246, 4912, 436, 528, 28, 21, 62, 244, 2400, 208, 2872, 390, 6858, 666, 840, 30
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Examples

			The top-left corner of the array:
   1,     3,     5,     7,     9,    11,    13,    15,    17,   ...
   2,     8,    14,    26,    20,    44,    32,    80,    74,   ...
   4,    24,    34,   124,    54,   174,    64,   624,   244,   ...
   6,    48,    76,   342,    90,   538,   118,  2400,   846,   ...
  10,   120,   142,  1330,   186,  1572,   208, 14640,  1858,   ...
  12,   168,   220,  2196,   246,  2872,   298, 28560,  3756,   ...
  ...
		

Crossrefs

Inverse permutation: A246276.
Transpose: A246273.
One less than A246278.
Related permutations: A038722, A246675, A246676.
Cf. also A003961.

Programs

Formula

a(n) = A246278(n+1)-1.
As a composition of related permutations:
a(n) = A246273(A038722(n)).

Extensions

Formula edited slightly because of changed starting offset of A246278. - Antti Karttunen, Jan 27 2015

A246276 Inverse of A246275 considered as a permutation of natural numbers.

Original entry on oeis.org

1, 3, 2, 6, 4, 10, 7, 5, 11, 15, 16, 21, 22, 8, 29, 28, 37, 36, 46, 17, 56, 45, 67, 9, 79, 12, 92, 55, 106, 66, 121, 30, 137, 13, 154, 78, 172, 68, 191, 91, 211, 105, 232, 23, 254, 120, 277, 14, 301, 93, 326, 136, 352, 24, 379, 155, 407, 153, 436, 171, 466, 57, 497, 39, 529, 190, 562, 192, 596, 210, 631, 231, 667, 47, 704, 19
Offset: 1

Views

Author

Antti Karttunen, Aug 21 2014

Keywords

Crossrefs

Programs

  • Scheme
    (define (A246276 n) (let ((x (A055396 (+ 1 n))) (y (A246277 (+ 1 n)))) (* (/ 1 2) (- (expt (+ x y) 2) x y y y -2))))

Formula

a(n) = 1 + ((((x+y)^2) - x - 3*y)/2), where x = A055396(n+1) and y = A246277(n+1).

A246683 Permutation of natural numbers: a(1) = 1, a(n) = A000079(A055396(n+1)-1) * ((2*a(A246277(n+1))) - 1).

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 6, 9, 16, 15, 32, 13, 10, 11, 64, 17, 128, 31, 18, 29, 256, 63, 12, 25, 14, 19, 512, 21, 1024, 127, 26, 33, 20, 255, 2048, 61, 58, 35, 4096, 57, 8192, 511, 30, 125, 16384, 23, 24, 49, 50, 27, 32768, 37, 36, 1023, 66, 41, 65536, 2047, 131072, 253, 62, 51, 52, 65, 262144, 39, 122, 509, 524288, 4095, 1048576, 121
Offset: 1

Views

Author

Antti Karttunen, Sep 06 2014

Keywords

Comments

See the comments in A246675. This is otherwise similar permutation, except that after having reached an even number 2m when we have shifted the prime factorization of n+1 k steps towards smaller primes, here, in contrary to A246675, we don't shift the binary representation of the odd number 2m-1, but instead of an odd number (2*a(m))-1 the same number (k) of bit-positions leftward, i.e. multiply it with 2^k.
See also the comments at the inverse permutation A246684.

Examples

			Consider 44 = 45-1. To find 45's position in array A246278, we start shifting its prime factorization 45 = 3 * 3 * 5 = p_2 * p_2 * p_3, step by step, until we get an even number, which in this case happens immediately after the first step, as p_1 * p_1 * p_2 = 2*2*3 = 12. 12 is in the 6th column of A246278, thus we take [here a(6) is computed recursively in the same way:] (2*a(6))-1 = (2*8)-1 = 15, "1111" in binary, and shift it one bit left (that is, multiply by 2), to give 2*15 = 30, thus a(44) = 30.
		

Crossrefs

Inverse: A246684.
Variants: A246675, A246677.
Differs from A249813 for the first time at n=20, where a(20) = 18, while A249813(20) = 14.

Formula

a(1) = 1, a(n) = A000079(A055396(n+1)-1) * ((2*a(A246277(n+1))) - 1).
As a composition of other permutations:
a(n) = A249813(A250244(n)).
Other identities. For all n >= 1, the following holds:
a(n) = (1+a((2*n)-1))/2. [The odd bisection from a(1) onward with one added and then halved gives the sequence back].
For all n >= 0, the following holds: a(A000051(n)) = A000051(n). [Numbers of the form 2^n + 1 are among the fixed points].

A249815 Permutation of natural numbers: a(n) = A249741(A055396(n+1), A246277(n+1)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 26, 21, 22, 23, 24, 25, 20, 27, 28, 29, 30, 31, 38, 33, 34, 35, 36, 37, 62, 39, 40, 41, 42, 43, 32, 45, 46, 47, 48, 49, 74, 51, 52, 53, 64, 55, 98, 57, 58, 59, 60, 61, 56, 63, 94, 65, 66, 67, 110, 69, 70, 71, 72, 73, 50, 75, 76, 77, 78, 79, 44, 81, 82, 83
Offset: 1

Views

Author

Antti Karttunen, Nov 06 2014

Keywords

Comments

a(n) tells which number in square array A249741 (the sieve of Eratosthenes minus 1) is at the same position where n is in array A246275. As the topmost row in both arrays is A005408 (odd numbers), they are fixed, i.e. a(2n+1) = 2n+1 for all n. Also, as the leftmost column in both arrays is primes minus one (A006093), they are also among the fixed points.
Equally: a(n) tells which number in array A114881 is at the same position where n is in the array A246273, as they are the transposes of above two arrays.

Crossrefs

Inverse: A249816
Similar or related permutations: A250244 ("deep variant"), A246675, A249811, A249817, A246273, A246275, A114881, A249741.
Differs from A249816 and A250243 for the first time at n=32, where a(32) = 38, while A249816(32) = A250243(32) = 44.
Differs from A250244 for the first time at n=39, where a(39) = 39, while A250244(39) = 51.

Programs

Formula

a(n) = A249741(A055396(n+1), A246277(n+1)).
As a composition of other permutations:
a(n) = A249811(A246675(n)).
a(n) = A249817(n+1) - 1.
Other identities. For all n >= 1:
a(A005408(n-1)) = A005408(n-1) and a(A006093(n)) = A006093(n). [Fixes odd numbers and precedents of primes. Cf. comments above].
Showing 1-10 of 14 results. Next