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

A245449 Fixed points of A245447 and A245448.

Original entry on oeis.org

1, 2, 3, 4, 5, 9, 13, 25, 26, 30, 33, 53, 93, 1023, 1034, 1203, 1330, 2657, 8584, 17159, 779212, 970225, 1558409, 8550146, 240902643, 244608573, 325422273, 414690595, 570131490, 1020233393, 1864797542, 2438037206
Offset: 1

Views

Author

Antti Karttunen, Jul 22 2014

Keywords

Comments

First apply A003961(n), where the primes in the prime factorization of natural number n are shifted one step left [i.e. each p_i changes to p_{i+1}]. Then increment the resulting odd number by one to get an even number, which is divided by 2, and the same three operations are done second time to that quotient. This sequence consists of such numbers for which the final result is equal to the original n which we started from.
8550146 is the largest term <= 123456789.
Numbers which are in 1- and 2-cycles of A048673 and A064216.

Examples

			For n = 30 = 2*3*5 = p_1 * p_2 * p_3, the first shift operation results p_2 * p_3 * p_4 = 3*5*7 = 105, and (105+1)/2 = 53, which is the 16th prime, p_16. Shifting this once left results p_17 = 59, and (59+1)/2 = 30 again. Thus 30 is included in the sequence. For the same reason 53 is also included in the sequence.
		

Crossrefs

A048674 is a subsequence.

Programs

Extensions

a(25)-a(32) added by Antti Karttunen, Sep 13 2014

A243500 Self-inverse permutation of natural numbers: a(2n) = A003961(A048673(n)), a(2n-1) = 2 * A245448(n).

Original entry on oeis.org

2, 1, 4, 3, 6, 5, 8, 7, 10, 9, 22, 27, 20, 15, 14, 33, 18, 17, 28, 13, 34, 11, 62, 29, 26, 25, 12, 19, 24, 75, 68, 43, 16, 21, 46, 69, 118, 45, 82, 243, 142, 99, 32, 63, 38, 35, 78, 171, 50, 49, 52, 51, 116, 275, 74, 147, 122, 81, 60, 59, 88, 23, 44, 201, 66, 65, 98, 31, 36
Offset: 1

Views

Author

Antti Karttunen, Jul 18 2014

Keywords

Crossrefs

Formula

a(2n) = A003961(A048673(n)), a(2n-1) = 2 * A245448(n).
a(2n) = A003961(A048673(n)), a(2n-1) = A243502(A064989(2n-1)).
a(2n) = A003961((A003961(n)+1)/2), a(2n-1) = 2 * A064216(A064989(2n-1)).

A064216 Replace each p^e with prevprime(p)^e in the prime factorization of odd numbers; inverse of sequence A048673 considered as a permutation of the natural numbers.

Original entry on oeis.org

1, 2, 3, 5, 4, 7, 11, 6, 13, 17, 10, 19, 9, 8, 23, 29, 14, 15, 31, 22, 37, 41, 12, 43, 25, 26, 47, 21, 34, 53, 59, 20, 33, 61, 38, 67, 71, 18, 35, 73, 16, 79, 39, 46, 83, 55, 58, 51, 89, 28, 97, 101, 30, 103, 107, 62, 109, 57, 44, 65, 49, 74, 27, 113, 82, 127, 85, 24, 131
Offset: 1

Views

Author

Howard A. Landman, Sep 21 2001

Keywords

Comments

a((A003961(n) + 1) / 2) = n and A003961(a(n)) = 2*n - 1 for all n. If the sequence is indexed by odd numbers only, it becomes multiplicative. In this variant sequence, denoted b, even indices don't exist, and we get b(1) = a(1) = 1, b(3) = a(2) = 2, b(5) = 3, b(7) = 5, b(9) = 4 = b(3) * b(3), ... , b(15) = 6 = b(3) * b(5), and so on. This property can also be stated as: a(x) * a(y) = a(((2x - 1) * (2y - 1) + 1) / 2) for x, y > 0. - Reinhard Zumkeller [re-expressed by Peter Munn, May 23 2020]
Not multiplicative in usual sense - but letting m=2n-1=product_j (p_j)^(e_j) then a(n)=a((m+1)/2)=product_j (p_(j-1))^(e_j). - Henry Bottomley, Apr 15 2005
From Antti Karttunen, Jul 25 2016: (Start)
Several permutations that use prime shift operation A064989 in their definition yield a permutation obtained from their odd bisection when composed with this permutation from the right. For example, we have:
A243505(n) = A122111(a(n)).
A243065(n) = A241909(a(n)).
A244153(n) = A156552(a(n)).
A245611(n) = A243071(a(n)).
(End)

Examples

			For n=11, the 11th odd number is 2*11 - 1 = 21 = 3^1 * 7^1. Replacing the primes 3 and 7 with the previous primes 2 and 5 gives 2^1 * 5^1 = 10, so a(11) = 10. - _Michael B. Porter_, Jul 25 2016
		

Crossrefs

Odd bisection of A064989 and A252463.
Row 1 of A251721, Row 2 of A249821.
Cf. A048673 (inverse permutation), A048674 (fixed points).
Cf. A246361 (numbers n such that a(n) <= n.)
Cf. A246362 (numbers n such that a(n) > n.)
Cf. A246371 (numbers n such that a(n) < n.)
Cf. A246372 (numbers n such that a(n) >= n.)
Cf. A246373 (primes p such that a(p) >= p.)
Cf. A246374 (primes p such that a(p) < p.)
Cf. A246343 (iterates starting from n=12.)
Cf. A246345 (iterates starting from n=16.)
Cf. A245448 (this permutation "squared", a(a(n)).)
Cf. A253894, A254044, A254045 (binary width, weight and the number of nonleading zeros in base-2 representation of a(n), respectively).
Cf. A285702, A285703 (phi and sigma applied to a(n).)
Here obviously the variant 2, A151799(n) = A007917(n-1), of the prevprime function is used.
Cf. also A003961, A270430, A270431.

Programs

  • Mathematica
    Table[Times @@ Power[If[# == 1, 1, NextPrime[#, -1]] & /@ First@ #, Last@ #] &@ Transpose@ FactorInteger[2 n - 1], {n, 69}] (* Michael De Vlieger, Dec 18 2014, revised Mar 17 2016 *)
  • PARI
    a(n) = {my(f = factor(2*n-1)); for (k=1, #f~, f[k,1] = precprime(f[k,1]-1)); factorback(f);} \\ Michel Marcus, Mar 17 2016
    
  • Python
    from sympy import factorint, prevprime
    from operator import mul
    def a(n):
        f=factorint(2*n - 1)
        return 1 if n==1 else reduce(mul, [prevprime(i)**f[i] for i in f]) # Indranil Ghosh, May 13 2017
  • Scheme
    (define (A064216 n) (A064989 (- (+ n n) 1))) ;; Antti Karttunen, May 12 2014
    

Formula

a(n) = A064989(2n - 1). - Antti Karttunen, May 12 2014
Sum_{k=1..n} a(k) ~ c * n^2, where c = Product_{p prime > 2} ((p^2-p)/(p^2-q(p))) = 0.6621117868..., where q(p) = prevprime(p) (A151799). - Amiram Eldar, Jan 21 2023

Extensions

More terms from Reinhard Zumkeller, Sep 26 2001
Additional description added by Antti Karttunen, May 12 2014

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)).

A243502 Permutation of even numbers: a(n) = 2 * A064216(n).

Original entry on oeis.org

2, 4, 6, 10, 8, 14, 22, 12, 26, 34, 20, 38, 18, 16, 46, 58, 28, 30, 62, 44, 74, 82, 24, 86, 50, 52, 94, 42, 68, 106, 118, 40, 66, 122, 76, 134, 142, 36, 70, 146, 32, 158, 78, 92, 166, 110, 116, 102, 178, 56, 194, 202, 60, 206, 214, 124, 218, 114, 88, 130, 98, 148, 54, 226, 164, 254, 170, 48
Offset: 1

Views

Author

Antti Karttunen, Jul 21 2014

Keywords

Crossrefs

Programs

Formula

a(n) = 2 * A064216(n) = A005843(A064216(n)).
a(n) = A243501(A245448(n)).

A245447 Permutation of natural numbers: a(n) = A048673(A048673(n)).

Original entry on oeis.org

1, 2, 3, 4, 5, 14, 8, 17, 9, 7, 6, 15, 13, 10, 38, 22, 11, 35, 23, 122, 50, 32, 18, 86, 25, 26, 138, 74, 41, 30, 12, 101, 33, 16, 43, 64, 28, 39, 24, 81, 20, 45, 68, 31, 176, 59, 63, 171, 34, 62, 203, 72, 53, 239, 44, 76, 47, 27, 19, 125, 29, 149, 218, 277, 158, 182, 113, 71, 40
Offset: 1

Views

Author

Antti Karttunen, Jul 22 2014

Keywords

Crossrefs

Inverse: A245448.
Fixed points: A245449.

Programs

Formula

a(n) = A048673(A048673(n)).
a(n) = (1/2) * (1 + A003961((1/2) * (1+A003961(n)))). [Where A003961(n) shifts the prime factorization of n one step left.]
a(n) = ((A003961(A243501(n)/2)) + 1) / 2 = ((A003961(A243501(n))/3) + 1) / 2.
For all n >= 1, A243501(n) = A243502(a(n)).

A286250 Filter-sequence: a(n) = A278223(A064216(n)) = A046523((2*A064216(n))-1).

Original entry on oeis.org

1, 2, 2, 4, 2, 2, 6, 2, 4, 6, 2, 2, 2, 6, 12, 6, 8, 2, 2, 2, 2, 16, 2, 6, 4, 6, 6, 2, 2, 30, 12, 6, 6, 4, 12, 6, 6, 6, 6, 6, 2, 2, 6, 6, 30, 2, 6, 2, 6, 6, 2, 6, 2, 6, 6, 6, 6, 2, 6, 6, 2, 12, 2, 36, 2, 6, 4, 2, 12, 30, 12, 12, 2, 12, 2, 24, 2, 2, 6, 6, 24, 2, 2, 12, 2, 24, 12, 2, 2, 30, 30, 6, 6, 2, 2, 4, 6, 2, 30, 6, 32, 2, 6, 2, 6, 2, 6, 12, 4, 2, 30, 2, 2
Offset: 1

Views

Author

Antti Karttunen, May 07 2017

Keywords

Crossrefs

Programs

  • PARI
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    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)};
    A064216(n) = A064989((2*n)-1);
    A286250(n) = A046523(-1+(2*A064216(n)));
    for(n=1, 10000, write("b286250.txt", n, " ", A286250(n)));
    
  • Python
    from sympy import factorint, prevprime
    from operator import mul
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a064216(n):
        f=factorint(2*n - 1)
        return 1 if n==1 else reduce(mul, [prevprime(i)**f[i] for i in f])
    def a(n): return a046523((2*a064216(n)) - 1) # Indranil Ghosh, May 13 2017
  • Scheme
    (define (A286250 n) (A046523 (+ -1 (* 2 (A064216 n)))))
    

Formula

a(n) = A046523(A245448(n)) = A278223(A064216(n)) = A046523((2*A064216(n))-1).
Showing 1-7 of 7 results.