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

A285705 a(n) = 2*n - A285703(n) = 2*n - A000203(A064216(n)).

Original entry on oeis.org

1, 1, 2, 2, 3, 4, 2, 4, 4, 2, 4, 4, 13, 13, 6, 2, 10, 12, 6, 4, 4, 2, 18, 4, 19, 10, 6, 24, 4, 6, 2, 22, 18, 6, 10, 4, 2, 37, 30, 6, 51, 4, 30, 16, 6, 20, 4, 24, 8, 44, 4, 2, 34, 4, 2, 16, 4, 36, 34, 36, 65, 10, 86, 14, 4, 4, 26, 76, 6, 2, 10, 48, 50, 55, 10, 2, 56, 36, 6, 16, 42, 6, 70, 4, 37, 46, 6, 98, 16, 6, 2, 4, 58, 76, 100, 10, 2, 52, 4, 2, 16, 60, 54
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Comments

Question: Are all terms positive? - Yes, they are, see A286385. (Note added Jul 24 2022).
For listening: fast tempo and percussive instrument, default "modulo 88" pitch mapping, all 10000 terms.

Crossrefs

Programs

  • Mathematica
    Table[2 n - DivisorSigma[1, #] &@ If[n == 1, 1, Apply[Times, FactorInteger[2 n - 1] /. {p_, e_} /; p > 2 :> NextPrime[p, -1]^e]], {n, 103}] (* Michael De Vlieger, Apr 26 2017 *)
  • 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); };
    A285705(n) = (n+n - sigma(A064989(n+n-1))); \\ Antti Karttunen, Jul 24 2022
    
  • Scheme
    (define (A285705 n) (- (* 2 n) (A285703 n)))

Formula

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

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

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 5, 4, 5, 8, 7, 8, 0, 1, 9, 14, 7, 6, 13, 16, 17, 20, 5, 20, 6, 16, 21, 4, 25, 24, 29, 10, 15, 28, 25, 32, 35, 1, 9, 34, -10, 38, 13, 28, 39, 26, 43, 24, 41, 6, 47, 50, 19, 50, 53, 40, 53, 22, 25, 24, -4, 52, -23, 50, 61, 62, 41, -8, 63, 68, 61, 24, 23, 19, 65, 74, 21, 42, 73, 64, 39, 76, 13, 80, 48, 40, 81, -10, 73, 84, 89, 88, 35, 18, -5
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Crossrefs

Programs

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

Formula

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

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

A285702 a(n) = A000010(A064216(n)).

Original entry on oeis.org

1, 1, 2, 4, 2, 6, 10, 2, 12, 16, 4, 18, 6, 4, 22, 28, 6, 8, 30, 10, 36, 40, 4, 42, 20, 12, 46, 12, 16, 52, 58, 8, 20, 60, 18, 66, 70, 6, 24, 72, 8, 78, 24, 22, 82, 40, 28, 32, 88, 12, 96, 100, 8, 102, 106, 30, 108, 36, 20, 48, 42, 36, 18, 112, 40, 126, 64, 8, 130, 136, 42, 60, 44, 20, 138, 148, 24, 56, 150, 46, 72, 156, 12, 162, 110, 32, 166, 24, 52, 172, 178
Offset: 1

Views

Author

Antti Karttunen, Apr 26 2017

Keywords

Crossrefs

Odd bisection of the following sequences: A347115, A348045, A349127, A349128.

Programs

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

Formula

a(n) = A000010(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.5366875995..., where q(p) = prevprime(p) (A151799) if p > 2 and q(2) = 1. - Amiram Eldar, Dec 21 2023

A326041 a(n) = sigma(A064989(n)).

Original entry on oeis.org

1, 1, 3, 1, 4, 3, 6, 1, 7, 4, 8, 3, 12, 6, 12, 1, 14, 7, 18, 4, 18, 8, 20, 3, 13, 12, 15, 6, 24, 12, 30, 1, 24, 14, 24, 7, 32, 18, 36, 4, 38, 18, 42, 8, 28, 20, 44, 3, 31, 13, 42, 12, 48, 15, 32, 6, 54, 24, 54, 12, 60, 30, 42, 1, 48, 24, 62, 14, 60, 24, 68, 7, 72, 32, 39, 18, 48, 36, 74, 4, 31, 38, 80, 18, 56, 42, 72, 8
Offset: 1

Views

Author

Antti Karttunen, Jun 03 2019

Keywords

Comments

The odd bisection is A285703, the even bisection is the sequence itself.

Crossrefs

Programs

  • PARI
    A326041(n) = if(1==n,n, my(f = factor(n)); prod(i=1, #f~, if(2==f[i,1],1,((precprime(f[i,1]-1)^(1+f[i,2]))-1)/(precprime(f[i,1]-1)-1))));
    
  • 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) };
    A326041(n) = sigma(A064989(n));

Formula

Multiplicative with a(2^e) = 1, and for odd primes p, a(p^e) = (q^(e+1)-1)/(q-1), where q = A151799(p).
a(n) = A000203(A064989(n)).
a(2n) = a(n).
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/3) * Product_{p prime} (p^3/((p+1)*(p^2-q(p)))) = 0.2722825585..., where q(p) = prevprime(p) (A151799) if p > 2 and q(2) = 1. - Amiram Eldar, Dec 21 2023
Showing 1-5 of 5 results.