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

A245608 Permutation of natural numbers, the even bisection of A245606 halved: a(n) = A245606(2*n)/2.

Original entry on oeis.org

1, 2, 3, 5, 4, 8, 13, 11, 6, 14, 18, 41, 7, 26, 28, 20, 9, 23, 63, 50, 25, 113, 313, 65, 12, 17, 88, 77, 172, 149, 43, 95, 16, 38, 33, 44, 10, 413, 163, 221, 19, 74, 48, 191, 22, 476, 118, 179, 49, 68, 138, 29, 39, 527, 78, 215, 31, 635, 1593, 227, 102, 71, 688, 242, 24, 122, 193, 104, 15, 98, 58, 176, 30, 32, 123
Offset: 1

Views

Author

Antti Karttunen, Jul 29 2014

Keywords

Crossrefs

Programs

Formula

a(n) = A245606(2*n)/2.
As a composition of related permutations:
a(n) = A048673(A245606(n)).
a(n) = A245708(A245706(n)).
Other identities:
For all n >= 0, a(2^n) = A245708(2^n). Moreover, A245709 gives all such k that a(k) = A245708(k).

A245708 Permutation of natural numbers, the odd bisection of A245606 incremented by one and halved: a(n) = (1+A245606((2*n)-1))/2.

Original entry on oeis.org

1, 2, 3, 5, 4, 8, 6, 11, 7, 14, 13, 41, 10, 23, 63, 20, 15, 17, 9, 50, 16, 26, 21, 65, 45, 32, 18, 44, 30, 413, 58, 95, 22, 53, 12, 29, 27, 38, 66, 221, 52, 122, 48, 77, 115, 83, 748, 179, 69, 263, 25, 365, 39, 113, 153, 176, 130, 158, 508, 1007, 247, 140, 78, 242, 97, 59, 33, 89, 72, 68, 36, 47, 49, 188, 28
Offset: 1

Views

Author

Antti Karttunen, Jul 30 2014

Keywords

Crossrefs

Programs

Formula

a(n) = (1+A245606((2*n)-1))/2.
As a composition of related permutations:
a(1) = 1, and for n > 1, a(n) = A048673(1+A245606(n-1)).
a(n) = A245608(A245705(n)).
Other identities:
For all n >= 0, a(2^n) = A245608(2^n). Moreover, A245709 gives all such k that a(k) = A245608(k).

A003961 Completely multiplicative with a(prime(k)) = prime(k+1).

Original entry on oeis.org

1, 3, 5, 9, 7, 15, 11, 27, 25, 21, 13, 45, 17, 33, 35, 81, 19, 75, 23, 63, 55, 39, 29, 135, 49, 51, 125, 99, 31, 105, 37, 243, 65, 57, 77, 225, 41, 69, 85, 189, 43, 165, 47, 117, 175, 87, 53, 405, 121, 147, 95, 153, 59, 375, 91, 297, 115, 93, 61, 315, 67, 111, 275, 729, 119
Offset: 1

Views

Author

Keywords

Comments

Meyers (see Guy reference) conjectures that for all r >= 1, the least odd number not in the set {a(i): i < prime(r)} is prime(r+1). - N. J. A. Sloane, Jan 08 2021
Meyers' conjecture would be refuted if and only if for some r there were such a large gap between prime(r) and prime(r+1) that there existed a composite c for which prime(r) < c < a(c) < prime(r+1), in which case (by Bertrand's postulate) c would necessarily be a term of A246281. - Antti Karttunen, Mar 29 2021
a(n) is odd for all n and for each odd m there exists a k with a(k) = m (see A064216). a(n) > n for n > 1: bijection between the odd and all numbers. - Reinhard Zumkeller, Sep 26 2001
a(n) and n have the same number of distinct primes with (A001222) and without multiplicity (A001221). - Michel Marcus, Jun 13 2014
From Antti Karttunen, Nov 01 2019: (Start)
More generally, a(n) has the same prime signature as n, A046523(a(n)) = A046523(n). Also A246277(a(n)) = A246277(n) and A287170(a(n)) = A287170(n).
Many permutations and other sequences that employ prime factorization of n to encode either polynomials, partitions (via Heinz numbers) or multisets in general can be easily defined by using this sequence as one of their constituent functions. See the last line in the Crossrefs section for examples.
(End)

Examples

			a(12) = a(2^2 * 3) = a(prime(1)^2 * prime(2)) = prime(2)^2 * prime(3) = 3^2 * 5 = 45.
a(A002110(n)) = A002110(n + 1) / 2.
		

References

  • Richard K. Guy, editor, Problems From Western Number Theory Conferences, Labor Day, 1983, Problem 367 (Proposed by Leroy F. Meyers, The Ohio State U.).

Crossrefs

See A045965 for another version.
Row 1 of table A242378 (which gives the "k-th powers" of this sequence), row 3 of A297845 and of A306697. See also arrays A066117, A246278, A255483, A308503, A329050.
Cf. A064989 (a left inverse), A064216, A000040, A002110, A000265, A027746, A046523, A048673 (= (a(n)+1)/2), A108228 (= (a(n)-1)/2), A191002 (= a(n)*n), A252748 (= a(n)-2n), A286385 (= a(n)-sigma(n)), A283980 (= a(n)*A006519(n)), A341529 (= a(n)*sigma(n)), A326042, A049084, A001221, A001222, A122111, A225546, A260443, A245606, A244319, A246269 (= A065338(a(n))), A322361 (= gcd(n, a(n))), A305293.
Cf. A249734, A249735 (bisections).
Cf. A246261 (a(n) is of the form 4k+1), A246263 (of the form 4k+3), A246271, A246272, A246259, A246281 (n such that a(n) < 2n), A246282 (n such that a(n) > 2n), A252742.
Cf. A275717 (a(n) > a(n-1)), A275718 (a(n) < a(n-1)).
Cf. A003972 (Möbius transform), A003973 (Inverse Möbius transform), A318321.
Cf. A300841, A305421, A322991, A250469, A269379 for analogous shift-operators in other factorization and quasi-factorization systems.
Cf. also following permutations and other sequences that can be defined with the help of this sequence: A005940, A163511, A122111, A260443, A206296, A265408, A265750, A275733, A275735, A297845, A091202 & A091203, A250245 & A250246, A302023 & A302024, A302025 & A302026.
A version for partition numbers is A003964, strict A357853.
A permutation of A005408.
Applying the same transformation again gives A357852.
Other multiplicative sequences: A064988, A357977, A357978, A357980, A357983.
A056239 adds up prime indices, row-sums of A112798.

Programs

  • Haskell
    a003961 1 = 1
    a003961 n = product $ map (a000040 . (+ 1) . a049084) $ a027746_row n
    -- Reinhard Zumkeller, Apr 09 2012, Oct 09 2011
    (MIT/GNU Scheme, with Aubrey Jaffer's SLIB Scheme library)
    (require 'factor)
    (define (A003961 n) (apply * (map A000040 (map 1+ (map A049084 (factor n))))))
    ;; Antti Karttunen, May 20 2014
    
  • Maple
    a:= n-> mul(nextprime(i[1])^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..80);  # Alois P. Heinz, Sep 13 2017
  • Mathematica
    a[p_?PrimeQ] := a[p] = Prime[ PrimePi[p] + 1]; a[1] = 1; a[n_] := a[n] = Times @@ (a[#1]^#2& @@@ FactorInteger[n]); Table[a[n], {n, 1, 65}] (* Jean-François Alcover, Dec 01 2011, updated Sep 20 2019 *)
    Table[Times @@ Map[#1^#2 & @@ # &, FactorInteger[n] /. {p_, e_} /; e > 0 :> {Prime[PrimePi@ p + 1], e}] - Boole[n == 1], {n, 65}] (* Michael De Vlieger, Mar 24 2017 *)
  • PARI
    a(n)=local(f); if(n<1,0,f=factor(n); prod(k=1,matsize(f)[1],nextprime(1+f[k,1])^f[k,2]))
    
  • PARI
    a(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Michel Marcus, May 17 2014
    
  • Perl
    use ntheory ":all";  sub a003961 { vecprod(map { next_prime($) } factor(shift)); }  # _Dana Jacobsen, Mar 06 2016
    
  • Python
    from sympy import factorint, prime, primepi, prod
    def a(n):
        f=factorint(n)
        return 1 if n==1 else prod(prime(primepi(i) + 1)**f[i] for i in f)
    [a(n) for n in range(1, 11)] # Indranil Ghosh, May 13 2017

Formula

If n = Product p(k)^e(k) then a(n) = Product p(k+1)^e(k).
Multiplicative with a(p^e) = A000040(A000720(p)+1)^e. - David W. Wilson, Aug 01 2001
a(n) = Product_{k=1..A001221(n)} A000040(A049084(A027748(n,k))+1)^A124010(n,k). - Reinhard Zumkeller, Oct 09 2011 [Corrected by Peter Munn, Nov 11 2019]
A064989(a(n)) = n and a(A064989(n)) = A000265(n). - Antti Karttunen, May 20 2014 & Nov 01 2019
A001221(a(n)) = A001221(n) and A001222(a(n)) = A001222(n). - Michel Marcus, Jun 13 2014
From Peter Munn, Oct 31 2019: (Start)
a(n) = A225546((A225546(n))^2).
a(A225546(n)) = A225546(n^2).
(End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/2) * Product_{p prime} ((p^2-p)/(p^2-nextprime(p))) = 2.06399637... . - Amiram Eldar, Nov 18 2022

A245605 Permutation of natural numbers: a(1) = 1, a(2n) = 2 * a(A064989(2n-1)), a(2n-1) = 1 + (2 * a(A064989(2n-1)-1)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 10, 7, 8, 13, 18, 17, 26, 11, 12, 37, 34, 25, 74, 15, 16, 69, 50, 21, 14, 19, 20, 33, 138, 41, 66, 35, 52, 53, 22, 277, 82, 31, 32, 45, 554, 65, 90, 27, 36, 1109, 130, 101, 42, 43, 28, 73, 2218, 149, 30, 71, 104, 57, 146, 209, 114, 51, 148, 133, 70, 293, 418, 555, 164, 141, 586, 329, 282, 75, 68, 105, 106, 1173, 658, 23, 24
Offset: 1

Views

Author

Antti Karttunen, Jul 29 2014

Keywords

Comments

The even bisection halved gives A245607. The odd bisection incremented by one and halved gives A245707.

Crossrefs

Programs

  • PARI
    A064989(n) = my(f = factor(n)); for(i=1, #f~, if((2 == f[i,1]),f[i,1] = 1,f[i,1] = precprime(f[i,1]-1))); factorback(f);
    A245605(n) = if(1==n, 1, if(0==(n%2), 2*A245605(A064989(n-1)), 1+(2*A245605(A064989(n)-1))));
    for(n=1, 10001, write("b245605.txt", n, " ", A245605(n)));
    
  • Scheme
    ;; With memoization-macro definec.
    (definec (A245605 n) (cond ((= 1 n) 1) ((even? n) (* 2 (A245605 (A064989 (- n 1))))) (else (+ 1 (* 2 (A245605 (-1+ (A064989 n))))))))

Formula

a(1) = 1, a(2n) = 2 * a(A064989(2n-1)), a(2n-1) = 1 + (2 * a(A064989(2n-1)-1)).
a(1) = 1, a(2n) = 2 * a(A064216(n)), a(2n-1) = 1 + (2 * a(A064216(n)-1)).
As a composition of related permutations:
a(n) = A245607(A048673(n)).

A244319 Self-inverse permutation of natural numbers: a(1) = 1, a(2n) = A003961(1+a(A064989(2n-1))), a(2n+1) = 1+A003961(a(A064989(2n+1)-1)).

Original entry on oeis.org

1, 3, 2, 9, 6, 5, 26, 11, 4, 21, 8, 125, 56, 25, 16, 15, 344, 115, 36, 1015, 10, 39, 204, 41, 14, 7, 52, 45, 86, 301, 176, 155, 298, 51, 50, 19, 518, 305, 22, 189, 24, 895, 1376, 49, 28, 825, 1268, 11875, 44, 35, 34, 27, 3186, 6625, 2388, 13, 454, 153, 126, 3191, 476, 131
Offset: 1

Views

Author

Antti Karttunen, Jul 18 2014; description corrected and PARI code added Jul 30 2014

Keywords

Comments

After 1, maps each even number to a unique odd number and vice versa, i.e., for all n > 1, A000035(a(n)) XOR A000035(n) = 1, where XOR is given in A003987.

Crossrefs

Related permutations: A048673, A064216, A245609-A245610.
Similar entanglement permutations: A245605-A245606, A235491, A236854, A243347, A244152.

Programs

Formula

a(1) = 1, a(2n) = A003961(1+a(A064989(2n-1))), a(2n+1) = A243501(a(A064989(2n+1)-1)).
As a composition of related permutations:
a(n) = A245609(A048673(n)) = A064216(A245610(n)).

A243501 Permutation of even numbers: a(n) = 2*A048673(n).

Original entry on oeis.org

2, 4, 6, 10, 8, 16, 12, 28, 26, 22, 14, 46, 18, 34, 36, 82, 20, 76, 24, 64, 56, 40, 30, 136, 50, 52, 126, 100, 32, 106, 38, 244, 66, 58, 78, 226, 42, 70, 86, 190, 44, 166, 48, 118, 176, 88, 54, 406, 122, 148, 96, 154, 60, 376, 92, 298, 116, 94, 62, 316, 68, 112, 276, 730, 120
Offset: 1

Views

Author

Antti Karttunen, Jul 21 2014

Keywords

Crossrefs

Formula

a(n) = 2*A048673(n).
a(n) = A003961(n) + 1.
a(n) = A243502(A245447(n)).

A246684 "Caves of prime shift" permutation: a(1) = 1, a(n) = A242378(A007814(n), 2*a(A003602(n))) - 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 8, 7, 6, 9, 14, 15, 24, 13, 26, 11, 10, 17, 20, 27, 34, 29, 80, 47, 48, 25, 32, 51, 124, 21, 44, 19, 12, 33, 74, 39, 54, 53, 98, 67, 76, 57, 104, 159, 624, 93, 404, 95, 120, 49, 50, 63, 64, 101, 152, 247, 342, 41, 38, 87, 174, 37, 62, 23, 16, 65, 56, 147, 244, 77, 188, 107, 90, 105, 374, 195, 324, 133, 170, 151, 142, 113, 92
Offset: 1

Views

Author

Antti Karttunen, Sep 06 2014

Keywords

Comments

See the comments in A246676. This is otherwise similar permutation, except that after having reached an odd number 2m-1 when we have shifted the binary representation of n right k steps, here, in contrary to A246676, we don't shift the primes in the prime factorization of the even number 2m, but instead of an even number (2*a(m)), shifting it the same number (k) of positions towards larger primes, whose product is then decremented by one to get the final result.
From Antti Karttunen, Jan 18 2015: (Start)
This can be viewed as an entanglement or encoding permutation where the complementary pairs of sequences to be interwoven together are even and odd numbers (A005843/A005408) which are entangled with another complementary pair: even numbers in the order they appear in A253885 and odd numbers in their usual order: (A253885/A005408).
From the above follows also that this sequence can be represented as a binary tree. Each child to the left is obtained by doubling the parent and subtracting one, and each child to the right is obtained by applying A253885 to the parent:
1
|
...................2...................
3 4
5......../ \........8 7......../ \........6
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
9 14 15 24 13 26 11 10
17 20 27 34 29 80 47 48 25 32 51 124 21 44 19 12
(End)

Examples

			Consider n=30, "11110" in binary. It has to be shifted just one bit-position right that the result were an odd number 15, "1111" in binary. As 15 = 2*8-1, we use 2*a(8) = 2*6 = 12 = 2*2*3 = p_1 * p_1 * p_2 [where p_k denotes the k-th prime, A000040(k)], which we shift one step towards larger primes resulting p_2 * p_2 * p_3 = 3*3*5 = 45, thus a(30) = 45-1 = 44.
		

Crossrefs

Inverse: A246683.
Other versions: A246676, A246678.
Similar or related permutations: A005940, A163511, A241909, A245606, A246278, A246375, A249814, A250243.
Differs from A249814 for the first time at n=14, where a(14) = 26, while A249814(14) = 20.

Programs

  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A246684(n) = { my(k=0); if(1==n, 1, while(!(n%2), n = n/2; k++); n = 2*A246684((n+1)/2); while(k>0, n = A003961(n); k--); n-1); };
    for(n=1, 8192, write("b246684.txt", n, " ", A246684(n)));
    (Scheme, with memoization-macro definec, two implementations)
    (definec (A246684 n) (cond ((<= n 1) n) (else (+ -1 (A242378bi (A007814 n) (* 2 (A246684 (A003602 n)))))))) ;; Code for A242378bi given in A242378.
    (definec (A246684 n) (cond ((<= n 1) n) ((even? n) (A253885 (A246684 (/ n 2)))) (else (+ -1 (* 2 (A246684 (/ (+ n 1) 2)))))))

Formula

a(1) = 1, a(n) = A242378(A007814(n), 2*a(A003602(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].
a(1) = 1, a(2n) = A253885(a(n)), a(2n+1) = (2*a(n+1))-1. - Antti Karttunen, Jan 18 2015
As a composition of other permutations:
a(n) = A250243(A249814(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].

A246375 Permutation of natural numbers: a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A003961(1+a(n)). [Where A003961(n) shifts the prime factorization of n one step towards larger primes].

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 9, 8, 7, 10, 15, 12, 11, 18, 21, 16, 25, 14, 27, 20, 13, 30, 81, 24, 17, 22, 45, 36, 23, 42, 39, 32, 19, 50, 51, 28, 35, 54, 99, 40, 55, 26, 33, 60, 37, 162, 129, 48, 49, 34, 75, 44, 29, 90, 87, 72, 41, 46, 135, 84, 47, 78, 189, 64, 65, 38, 63, 100, 95, 102, 153, 56, 31, 70
Offset: 1

Views

Author

Antti Karttunen, Aug 27 2014

Keywords

Comments

This can be viewed as yet another "entanglement permutation" where the two complementary pairs to be interwoven together are even and odd numbers (A005843/A005408) which are entangled with the complementary pair even numbers (taken straight) and odd numbers in the order they appear in A003961: (A005843/A003961). Sequence A163511 has almost the same definition, but its domain starts from 0, which results a different permutation.

Crossrefs

Inverse: A246376.
Similar or related permutations: A005940, A005941, A163511, A245606, A246378, A246379.

Programs

  • PARI
    default(primelimit, (2^31)+(2^30));
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ Using code of Michel Marcus
    A246375(n) = if(1==n, 1, if(!(n%2), 2*A246375(n/2), A003961(1+A246375((n-1)/2))));
    for(n=1, 16384, write("b246375.txt", n, " ", A246375(n)));
    (Scheme, with memoizing definec-macro)
    (definec (A246375 n) (cond ((<= n 1) n) ((even? n) (* 2 (A246375 (/ n 2)))) (else (A003961 (+ 1 (A246375 (/ (- n 1) 2)))))))

Formula

a(1) = 1, a(2n) = 2*a(n), a(2n+1) = A003961(1+a(n)). [Where A003961(n) shifts the prime factorization of n one step towards larger primes].
As a composition of related permutations:
a(n) = A246379(A246378(n)).
Other identities. For all n >= 1 the following holds:
A000035(a(n)) = A000035(n). [Like A005940 & A005941, this also preserves the parity].

A245706 Permutation of natural numbers: a(n) = A245707(A245608(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 11, 8, 7, 10, 27, 12, 9, 22, 75, 16, 19, 14, 15, 20, 51, 54, 659, 24, 35, 18, 91, 44, 565, 150, 83, 32, 21, 38, 67, 28, 13, 30, 99, 40, 139, 102, 43, 108, 33, 1318, 651, 48, 73, 70, 115, 36, 53, 182, 63, 88, 105, 1130, 19179, 300, 1107, 166, 8875, 64, 555, 42
Offset: 1

Views

Author

Antti Karttunen, Jul 30 2014

Keywords

Comments

The even bisection halved gives the sequence back. The odd bisection incremented by one and halved gives A245712.

Crossrefs

Inverse: A245705.
Fixed points: A245709.

Programs

Formula

a(n) = A245707(A245608(n)).

A245604 Permutation of natural numbers: a(1)=1, a(2n) = A026424(a(n)), a(2n+1) = A028260(1+a(n)).

Original entry on oeis.org

1, 2, 4, 3, 6, 7, 10, 5, 9, 11, 15, 12, 16, 18, 24, 8, 14, 17, 22, 19, 25, 28, 35, 20, 26, 29, 36, 31, 39, 44, 55, 13, 21, 27, 34, 30, 38, 42, 51, 32, 40, 45, 56, 50, 60, 67, 81, 37, 46, 47, 57, 52, 62, 68, 82, 59, 65, 72, 86, 79, 93, 105, 121, 23, 33, 41, 49, 48, 58, 66, 77, 53, 64, 71, 85, 76, 90, 99, 111, 61
Offset: 1

Views

Author

Antti Karttunen, Jul 27 2014

Keywords

Crossrefs

Inverse: A245603.
Similar permutations: A143691, A244152, A244322, A245614, A245606, A245608.

Formula

a(1)=1, a(2n) = A026424(a(n)), a(2n+1) = A028260(1+a(n)).
As a composition of related permutations:
a(n) = A245614(A244322(n)).
For all n >= 1, A066829(a(n)) = 1 - A000035(n). [Permutation A143691 has the same property].
Equally, A066829(a(n)*a(n+1)) = 1 for all n.
Showing 1-10 of 13 results. Next