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

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

A347115 Möbius transform of A341515.

Original entry on oeis.org

1, 4, 1, 10, 2, 5, 4, 30, 2, 118, 6, 12, 10, 236, 2, 90, 12, 64, 16, 240, 4, 594, 18, 36, 6, 830, 4, 480, 22, -116, 28, 270, 6, 1428, 8, 132, 30, 1784, 10, 720, 36, 1076, 40, 1200, 4, 2622, 42, 108, 20, 144, 12, 1680, 46, 458, 12, 1440, 16, 4178, 52, -228, 58, 4772, 8, 810, 20, 1242, 60, 2880, 18, 2752, 66, 396
Offset: 1

Views

Author

Antti Karttunen, Aug 20 2021

Keywords

Crossrefs

Cf. A285702 (odd bisection), A347116 (even bisection).

Programs

  • PARI
    A005940(n) = { my(p=2, t=1); n--; until(!n\=2, if((n%2), (t*=p), p=nextprime(p+1))); (t); };
    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)};
    A156552(n) = { my(f = factor(n), p, p2 = 1, res = 0); for(i = 1, #f~, p = 1 << (primepi(f[i, 1]) - 1); res += (p * p2 * (2^(f[i, 2]) - 1)); p2 <<= f[i, 2]); res };
    A329603(n) = A005940(2+(3*A156552(n)));
    A341515(n) = if(n%2, A064989(n), A329603(n));
    A347115(n) = sumdiv(n,d,moebius(n/d)*A341515(d));

Formula

a(n) = A008683(n/d) * A341515(d).

A348045 Möbius transform of A252463, where A252463 shifts the prime factorization of odd numbers one step towards smaller primes and divides even numbers by two.

Original entry on oeis.org

1, 0, 1, 1, 2, 1, 4, 2, 2, 2, 6, 2, 10, 2, 2, 4, 12, 4, 16, 4, 4, 4, 18, 4, 6, 2, 4, 6, 22, 6, 28, 8, 6, 4, 8, 6, 30, 2, 10, 8, 36, 8, 40, 10, 4, 4, 42, 8, 20, 14, 12, 12, 46, 14, 12, 12, 16, 6, 52, 8, 58, 2, 8, 16, 20, 14, 60, 16, 18, 16, 66, 12, 70, 6, 6, 18, 24, 14, 72, 16, 8, 4, 78, 12, 24, 2, 22, 20, 82, 20
Offset: 1

Views

Author

Antti Karttunen, Oct 12 2021

Keywords

Crossrefs

Cf. A008683, A064989, A252463, A285702 (odd bisection), A348046 (positions of 2's).
Cf. also A023022, A326305, A347115.

Programs

  • 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)};
    A252463(n) = if(!(n%2),n/2,A064989(n));
    A348045(n) = sumdiv(n,d,moebius(n/d)*A252463(d));

Formula

a(n) = Sum_{d|n} A008683(n/d) * A252463(d).

A349127 Möbius transform of A064989, where A064989 is multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p.

Original entry on oeis.org

1, 0, 1, 0, 2, 0, 4, 0, 2, 0, 6, 0, 10, 0, 2, 0, 12, 0, 16, 0, 4, 0, 18, 0, 6, 0, 4, 0, 22, 0, 28, 0, 6, 0, 8, 0, 30, 0, 10, 0, 36, 0, 40, 0, 4, 0, 42, 0, 20, 0, 12, 0, 46, 0, 12, 0, 16, 0, 52, 0, 58, 0, 8, 0, 20, 0, 60, 0, 18, 0, 66, 0, 70, 0, 6, 0, 24, 0, 72, 0, 8, 0, 78, 0, 24, 0, 22, 0, 82, 0, 40, 0, 28, 0, 32
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2021

Keywords

Comments

The multiplicative definition of this sequence ("Möbius transform of prime shift towards lesser primes") differs from otherwise similarly defined A349128 (Euler phi applied to A064989) only in that here a(2^e) = 0, while A349128(2^e) = 1.
Compare the situation with A003961 ("prime shift towards larger primes"), where A003972(n) = A000010(A003961(n)) is also the Möbius transform of A003961.

Crossrefs

Agrees with A347115, A348045 and A349128 on odd numbers.
Cf. A000004, A285702 (even and odd bisection).

Programs

  • Mathematica
    f[p_, e_] := ((q = NextPrime[p, -1]) - 1)*q^(e - 1); a[1] = 1; a[n_] := If[EvenQ[n], 0, Times @@ f @@@ FactorInteger[n]]; Array[a, 100] (* Amiram Eldar, Nov 13 2021 *)
  • PARI
    A349127(n) = if(!(n%2),0, my(f = factor(n), q); prod(i=1, #f~, q = precprime(f[i,1]-1); (q-1)*(q^(f[i,2]-1))));
    
  • PARI
    A064989(n) = { my(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); };
    A349127(n) = if(n%2, eulerphi(A064989(n)), 0);
    
  • PARI
    A349127(n) = sumdiv(n,d,moebius(n/d)*A064989(d));

Formula

Multiplicative with a(2^e) = 0, and for odd primes p, a(p^e) = (q-1)*q^(e-1), where q = prevprime(p), where prevprime is A151799.
If n is odd, then a(n) = A000010(A064989(n)), and if n is even, then a(n) = 0.
a(n) = Sum_{d|n} A008683(d) * A064989(n/d).
For all n >= 1, a(2n-1) = A347115(2n-1) = A348045(2n-1) = A349128(2n-1) = A285702(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (16/Pi^4) / Product_{p prime > 2} (1+1/p-q(p)/p^2-q(p)/p^3) = 0.1341718..., where q(p) = prevprime(p) = A151799(p). - Amiram Eldar, Dec 24 2022

A285703 a(n) = A000203(A064216(n)).

Original entry on oeis.org

1, 3, 4, 6, 7, 8, 12, 12, 14, 18, 18, 20, 13, 15, 24, 30, 24, 24, 32, 36, 38, 42, 28, 44, 31, 42, 48, 32, 54, 54, 60, 42, 48, 62, 60, 68, 72, 39, 48, 74, 31, 80, 56, 72, 84, 72, 90, 72, 90, 56, 98, 102, 72, 104, 108, 96, 110, 80, 84, 84, 57, 114, 40, 114, 126, 128, 108, 60, 132, 138, 132, 96, 96, 93, 140, 150, 98, 120, 152, 144, 120, 158, 96, 164, 133, 126
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[1, #] &@ If[n == 1, 1, Apply[Times, FactorInteger[2 n - 1] /. {p_, e_} /; p > 2 :> NextPrime[p, -1]^e]], {n, 86}] (* Michael De Vlieger, Apr 26 2017 *)
  • Scheme
    (define (A285703 n) (A000203 (A064216 n)))

Formula

a(n) = A000203(A064216(n)).
Sum_{k=1..n} a(k) ~ c * n^2, where c = Product_{p prime} (p^3/((p+1)*(p^2-q(p)))) = 0.8168476756..., where q(p) = prevprime(p) (A151799) if p > 2 and q(2) = 1. - Amiram Eldar, Dec 21 2023

A349128 a(n) = phi(A064989(n)), where A064989 is multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p, and phi is Euler totient function.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 4, 1, 2, 2, 6, 1, 10, 4, 2, 1, 12, 2, 16, 2, 4, 6, 18, 1, 6, 10, 4, 4, 22, 2, 28, 1, 6, 12, 8, 2, 30, 16, 10, 2, 36, 4, 40, 6, 4, 18, 42, 1, 20, 6, 12, 10, 46, 4, 12, 4, 16, 22, 52, 2, 58, 28, 8, 1, 20, 6, 60, 12, 18, 8, 66, 2, 70, 30, 6, 16, 24, 10, 72, 2, 8, 36, 78, 4, 24, 40, 22, 6, 82, 4, 40
Offset: 1

Views

Author

Antti Karttunen, Nov 13 2021

Keywords

Comments

See comments in A349127.

Crossrefs

Agrees with A347115, A348045 and A349127 on odd numbers.
Cf. A285702 (odd bisection).
Cf. A000010, A064989, A151799, A349122 (inverse Möbius transform).
Cf. also A003972.

Programs

  • Mathematica
    f[p_, e_] := If[p == 2, 1, Module[{q = NextPrime[p, -1]}, (q - 1)*q^(e - 1)]]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 24 2022 *)
  • PARI
    A349128(n) = { my(f = factor(n), q); prod(i=1, #f~, if(2==f[i,1], 1, q = precprime(f[i,1]-1); (q-1)*(q^(f[i,2]-1)))); };

Formula

Multiplicative with a(2^e) = 1, and for odd primes p, a(p^e) = (q - 1)*q^(e-1), where q = prevprime(p), where prevprime is A151799.
For odd n, a(n) = A349127(n), for even n, a(n) = a(n/2).
For all n >= 1, a(n) = a(2*n) = a(A000265(n)).
For all n >= 1, a(A000040(1+n)) = A006093(n) = A000040(n)-1.
Sum_{k=1..n} a(k) ~ c * n^2, where c = (64/(3*Pi^4)) / Product_{p prime > 2} (1+1/p-q(p)/p^2-q(p)/p^3) = 0.17889586..., where q(p) = prevprime(p) = A151799(p). - Amiram Eldar, Dec 24 2022

A349122 Inverse Möbius transform of A349128, where A349128(n) = phi(A064989(n)), A064989 is multiplicative with a(2^e) = 1 and a(p^e) = prevprime(p)^e for odd primes p, and phi is Euler totient function.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Nov 13 2021

Keywords

Comments

Multiplicative because A349128 is.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p, -1]^e; f[2, e_] := e + 1; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Dec 24 2022 *)
  • PARI
    A349128(n) = { my(f = factor(n), q); prod(i=1, #f~, if(2==f[i,1], 1, q = precprime(f[i,1]-1); (q-1)*(q^(f[i,2]-1)))); };
    A349122(n) = sumdiv(n,d,A349128(d));
    
  • Python
    from sympy import prevprime, factorint, prod
    def f(p, e):
        return e+1 if p == 2 else prevprime(p)**e
    def a(n):
        return prod(f(p, e) for p, e in factorint(n).items()) # Sebastian Karlsson, Nov 15 2021

Formula

a(n) = Sum_{d|n} A349128(d).
For all n >= 1, a(A003961(n)) = n, a(2*n-1) = A064216(n).
From Sebastian Karlsson, Nov 15 2021: (Start)
a(2*n-1) = A064989(2*n-1).
Multiplicative with a(2^e) = e + 1 and a(p^e) = prevprime(p)^e for odd primes p. (End)
Sum_{k=1..n} a(k) ~ c * n^2, where c = (4/9) * Product_{p prime > 2} ((p^2-p)/(p^2-prevprime(p))) = 0.2942719052..., where prevprime is A151799. - Amiram Eldar, Dec 24 2022

A353413 a(n) = A000265(A064216(n)).

Original entry on oeis.org

1, 1, 3, 5, 1, 7, 11, 3, 13, 17, 5, 19, 9, 1, 23, 29, 7, 15, 31, 11, 37, 41, 3, 43, 25, 13, 47, 21, 17, 53, 59, 5, 33, 61, 19, 67, 71, 9, 35, 73, 1, 79, 39, 23, 83, 55, 29, 51, 89, 7, 97, 101, 15, 103, 107, 31, 109, 57, 11, 65, 49, 37, 27, 113, 41, 127, 85, 3, 131, 137, 43, 77, 69, 25, 139, 149, 13, 87, 151, 47, 95
Offset: 1

Views

Author

Antti Karttunen, Apr 18 2022

Keywords

Crossrefs

Odd bisection of A353412.
Cf. also A285702.

Programs

Formula

a(n) = A353412(2*n-1) = A000265(A064216(n)).
For all n >= 1, A000120(a(n)) = A254044(n).
Showing 1-8 of 8 results.