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

A323894 Sum of A048673 and its Dirichlet inverse, A323893.

Original entry on oeis.org

2, 0, 0, 4, 0, 12, 0, 12, 9, 16, 0, 26, 0, 24, 24, 37, 0, 46, 0, 36, 36, 28, 0, 76, 16, 36, 51, 56, 0, 58, 0, 114, 42, 40, 48, 121, 0, 48, 54, 106, 0, 94, 0, 66, 104, 60, 0, 223, 36, 92, 60, 86, 0, 220, 56, 166, 72, 64, 0, 164, 0, 76, 162, 349, 72, 112, 0, 96, 90, 136, 0, 354, 0, 84, 150, 116, 84, 148, 0, 312, 277, 88, 0, 260, 80, 96, 96
Offset: 1

Views

Author

Antti Karttunen, Feb 08 2019

Keywords

Comments

The first four negative terms are a(3063060) = -14126242, a(3423420) = -17546656, a(4084080) = -14460312, a(4144140) = -22677277. - Antti Karttunen, Apr 20 2022

Crossrefs

Programs

  • PARI
    up_to = 65537;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A048673(n) = (A003961(n)+1)/2;
    v323893 = DirInverse(vector(up_to,n,A048673(n)));
    A323893(n) = v323893[n];
    A323894(n) = (A048673(n)+A323893(n));

Formula

a(n) = A048673(n) + A323893(n).
For n > 1, a(n) = -Sum_{d|n, 1A048673(n/d) * A323893(d). - Antti Karttunen, Apr 20 2022
a(n) = A349135(A003961(n)). - Antti Karttunen, Nov 30 2024

A324336 a(n) = A323893(A005940(1+n)).

Original entry on oeis.org

1, -2, -3, -1, -4, 4, -4, -2, -6, 5, 6, 3, -9, 8, -12, -4, -7, 7, 8, 4, 9, 5, 16, 8, -25, 18, 27, 8, -36, 32, -36, -8, -9, 8, 9, 6, 10, 11, 24, 11, 12, 20, 49, 6, 54, 4, 72, 20, -36, 50, 75, 18, 100, 0, 72, 16, -150, 99, 162, 24, -144, 120, -108, -16, -10, 10, 11, 7, 12, 14, 28, 17, 14, 25, 60, 12, 63, 12, 112, 28, 15, 47, 106, 21, 165, -110, 84, -5
Offset: 0

Views

Author

Antti Karttunen, Feb 23 2019

Keywords

Crossrefs

Programs

Formula

a(n) = A323893(A005940(1+n)).

A048673 Permutation of natural numbers: a(n) = (A003961(n)+1) / 2 [where A003961(n) shifts the prime factorization of n one step towards larger primes].

Original entry on oeis.org

1, 2, 3, 5, 4, 8, 6, 14, 13, 11, 7, 23, 9, 17, 18, 41, 10, 38, 12, 32, 28, 20, 15, 68, 25, 26, 63, 50, 16, 53, 19, 122, 33, 29, 39, 113, 21, 35, 43, 95, 22, 83, 24, 59, 88, 44, 27, 203, 61, 74, 48, 77, 30, 188, 46, 149, 58, 47, 31, 158, 34, 56, 138, 365, 60, 98, 36, 86, 73
Offset: 1

Views

Author

Antti Karttunen, Jul 14 1999

Keywords

Comments

Inverse of sequence A064216 considered as a permutation of the positive integers. - Howard A. Landman, Sep 25 2001
From Antti Karttunen, Dec 20 2014: (Start)
Permutation of natural numbers obtained by replacing each prime divisor of n with the next prime and mapping the generated odd numbers back to all natural numbers by adding one and then halving.
Note: there is a 7-cycle almost right in the beginning: (6 8 14 17 10 11 7). (See also comments at A249821. This 7-cycle is endlessly copied in permutations like A250249/A250250.)
The only 3-cycle in range 1 .. 402653184 is (2821 3460 5639).
For 1- and 2-cycles, see A245449.
(End)
The first 5-cycle is (1410, 2783, 2451, 2703, 2803). - Robert Israel, Jan 15 2015
From Michel Marcus, Aug 09 2020: (Start)
(5194, 5356, 6149, 8186, 10709), (46048, 51339, 87915, 102673, 137205) and (175811, 200924, 226175, 246397, 267838) are other 5-cycles.
(10242, 20479, 21413, 29245, 30275, 40354, 48241) is another 7-cycle. (End)
From Antti Karttunen, Feb 10 2021: (Start)
Somewhat artificially, also this permutation can be represented as a binary tree. Each child to the left is obtained by multiplying the parent by 3 and subtracting one, while each child to the right is obtained by applying A253888 to the parent:
1
|
................../ \..................
2 3
5......../ \........4 8......../ \........6
/ \ / \ / \ / \
/ \ / \ / \ / \
/ \ / \ / \ / \
14 13 11 7 23 9 17 18
41 10 38 12 32 28 20 15 68 25 26 63 50 16 53 19
etc.
Each node's (> 1) parent can be obtained with A253889. Sequences A292243, A292244, A292245 and A292246 are constructed from the residues (mod 3) of the vertices encountered on the path from n to the root (1).
(End)

Examples

			For n = 6, as 6 = 2 * 3 = prime(1) * prime(2), we have a(6) = ((prime(1+1) * prime(2+1))+1) / 2 = ((3 * 5)+1)/2 = 8.
For n = 12, as 12 = 2^2 * 3, we have a(12) = ((3^2 * 5) + 1)/2 = 23.
		

Crossrefs

Inverse: A064216.
Row 1 of A251722, Row 2 of A249822.
One more than A108228, half the terms of A243501.
Fixed points: A048674.
Positions of records: A029744, their values: A246360 (= A007051 interleaved with A057198).
Positions of subrecords: A247283, their values: A247284.
Cf. A246351 (Numbers n such that a(n) < n.)
Cf. A246352 (Numbers n such that a(n) >= n.)
Cf. A246281 (Numbers n such that a(n) <= n.)
Cf. A246282 (Numbers n such that a(n) > n.), A252742 (their char. function)
Cf. A246261 (Numbers n for which a(n) is odd.)
Cf. A246263 (Numbers n for which a(n) is even.)
Cf. A246260 (a(n) reduced modulo 2), A341345 (modulo 3), A341346, A292251 (3-adic valuation), A292252.
Cf. A246342 (Iterates starting from n=12.)
Cf. A246344 (Iterates starting from n=16.)
Cf. A245447 (This permutation "squared", a(a(n)).)
Other permutations whose formulas refer to this sequence: A122111, A243062, A243066, A243500, A243506, A244154, A244319, A245605, A245608, A245610, A245612, A245708, A246265, A246267, A246268, A246363, A249745, A249824, A249826, and also A183209, A254103 that are somewhat similar.
Cf. also prime-shift based binary trees A005940, A163511, A245612 and A244154.
Cf. A253888, A253889, A292243, A292244, A292245 and A292246 for other derived sequences.
Cf. A323893 (Dirichlet inverse), A323894 (sum with it), A336840 (inverse Möbius transform).

Programs

  • Haskell
    a048673 = (`div` 2) . (+ 1) . a045965
    -- Reinhard Zumkeller, Jul 12 2012
    
  • Maple
    f:= proc(n)
    local F,q,t;
      F:= ifactors(n)[2];
      (1 + mul(nextprime(t[1])^t[2], t = F))/2
    end proc:
    seq(f(n),n=1..1000); # Robert Israel, Jan 15 2015
  • Mathematica
    Table[(Times @@ Power[If[# == 1, 1, NextPrime@ #] & /@ First@ #, Last@ #] + 1)/2 &@ Transpose@ FactorInteger@ n, {n, 69}] (* Michael De Vlieger, Dec 18 2014, revised Mar 17 2016 *)
  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A048673(n) = (A003961(n)+1)/2; \\ Antti Karttunen, Dec 20 2014
    
  • PARI
    A048673(n) = if(1==n,n,if(n%2,A253888(A048673((n-1)/2)),(3*A048673(n/2))-1)); \\ (Not practical, but demonstrates the construction as a binary tree). - Antti Karttunen, Feb 10 2021
    
  • Python
    from sympy import factorint, nextprime, prod
    def a(n):
        f = factorint(n)
        return 1 if n==1 else (1 + prod(nextprime(i)**f[i] for i in f))//2 # Indranil Ghosh, May 09 2017
  • Scheme
    (define (A048673 n) (/ (+ 1 (A003961 n)) 2)) ;; Antti Karttunen, Dec 20 2014
    

Formula

From Antti Karttunen, Dec 20 2014: (Start)
a(1) = 1; for n>1: If n = product_{k>=1} (p_k)^(c_k), then a(n) = (1/2) * (1 + product_{k>=1} (p_{k+1})^(c_k)).
a(n) = (A003961(n)+1) / 2.
a(n) = floor((A045965(n)+1)/2).
Other identities. For all n >= 1:
a(n) = A108228(n)+1.
a(n) = A243501(n)/2.
A108951(n) = A181812(a(n)).
a(A246263(A246268(n))) = 2*n.
As a composition of other permutations involving prime-shift operations:
a(n) = A243506(A122111(n)).
a(n) = A243066(A241909(n)).
a(n) = A241909(A243062(n)).
a(n) = A244154(A156552(n)).
a(n) = A245610(A244319(n)).
a(n) = A227413(A246363(n)).
a(n) = A245612(A243071(n)).
a(n) = A245608(A245605(n)).
a(n) = A245610(A244319(n)).
a(n) = A249745(A249824(n)).
For n >= 2, a(n) = A245708(1+A245605(n-1)).
(End)
From Antti Karttunen, Jan 17 2015: (Start)
We also have the following identities:
a(2n) = 3*a(n) - 1. [Thus a(2n+1) = 0 or 1 when reduced modulo 3. See A341346]
a(3n) = 5*a(n) - 2.
a(4n) = 9*a(n) - 4.
a(5n) = 7*a(n) - 3.
a(6n) = 15*a(n) - 7.
a(7n) = 11*a(n) - 5.
a(8n) = 27*a(n) - 13.
a(9n) = 25*a(n) - 12.
and in general:
a(x*y) = (A003961(x) * a(y)) - a(x) + 1, for all x, y >= 1.
(End)
From Antti Karttunen, Feb 10 2021: (Start)
For n > 1, a(2n) = A016789(a(n)-1), a(2n+1) = A253888(a(n)).
a(2^n) = A007051(n) for all n >= 0. [A property shared with A183209 and A254103].
(End)
a(n) = A003602(A003961(n)). - Antti Karttunen, Apr 20 2022
Sum_{k=1..n} a(k) ~ c * n^2, where c = (1/4) * Product_{p prime} ((p^2-p)/(p^2-nextprime(p))) = 1.0319981... , where nextprime is A151800. - Amiram Eldar, Jan 18 2023

Extensions

New name and crossrefs to derived sequences added by Antti Karttunen, Dec 20 2014

A346234 Dirichlet inverse of A003961, where A003961(n) is fully multiplicative with a(prime(k)) = prime(k+1).

Original entry on oeis.org

1, -3, -5, 0, -7, 15, -11, 0, 0, 21, -13, 0, -17, 33, 35, 0, -19, 0, -23, 0, 55, 39, -29, 0, 0, 51, 0, 0, -31, -105, -37, 0, 65, 57, 77, 0, -41, 69, 85, 0, -43, -165, -47, 0, 0, 87, -53, 0, 0, 0, 95, 0, -59, 0, 91, 0, 115, 93, -61, 0, -67, 111, 0, 0, 119, -195, -71, 0, 145, -231, -73, 0, -79, 123, 0, 0, 143, -255, -83, 0, 0, 129
Offset: 1

Views

Author

Antti Karttunen, Jul 11 2021

Keywords

Crossrefs

Programs

  • PARI
    up_to = 16384;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    v346234 = DirInverseCorrect(vector(up_to,n,A003961(n)));
    A346234(n) = v346234[n];
    
  • PARI
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A346234(n) = (moebius(n)*A003961(n));
    
  • PARI
    A346234(n) = { my(f = factor(n)); prod(i=1, #f~, if(1Antti Karttunen, Nov 14 2021

Formula

a(n) = A055615(A003961(n)).
a(n) = A008683(n) * A003961(n).
Multiplicative with a(p^e) = 0 if e > 1, and -nextprime(p) otherwise, where nextprime function is A151800. - Antti Karttunen, Nov 14 2021

Extensions

Keyword:mult added by Antti Karttunen, Nov 14 2021

A349398 Dirichlet convolution of A048673 with the Dirichlet inverse of its inverse permutation.

Original entry on oeis.org

1, 0, 0, 0, 0, 1, -5, 8, 0, -6, -3, 2, 0, 19, -5, -4, -4, 20, -19, 22, 6, -15, 3, -8, 0, 0, 16, 16, -18, 24, -40, 70, 9, -24, 21, -7, -50, 55, 8, -24, 6, -41, -15, 58, 20, -17, -31, 108, 27, 70, -37, -24, 0, -20, -49, -98, 6, 26, -13, 21, -15, 62, 158, 84, -22, 9, -49, 130, -67, 12, -49, 62, -29, 112, 4, -60, 103, 16
Offset: 1

Views

Author

Antti Karttunen, Nov 19 2021

Keywords

Comments

Dirichlet convolution of A048673 with A349358, which is the Dirichlet inverse of A064216 (inverse permutation of A048673). Therefore, convolving A064216 with this sequence gives A048673.
Note how for n = 1 .. 35, a(n) = -A349397(n).

Crossrefs

Cf. A003961, A048673, A064216, A064989, A323893, A349397 (Dirichlet inverse), A349399 (sum with it).
Cf. also A349376, A349377, A349385.

Programs

  • PARI
    A048673(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (1/2)*(1+factorback(f)); };
    A064216(n) = { my(f = factor(n+n-1)); 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); };
    memoA349358 = Map();
    A349358(n) = if(1==n,1,my(v); if(mapisdefined(memoA349358,n,&v), v, v = -sumdiv(n,d,if(dA064216(n/d)*A349358(d),0)); mapput(memoA349358,n,v); (v)));
    A349398(n) = sumdiv(n,d,A048673(n/d)*A349358(d));

Formula

a(n) = Sum_{d|n} A048673(n/d) * A349358(d).

A349397 Dirichlet convolution of A064216 with the Dirichlet inverse of its inverse permutation.

Original entry on oeis.org

1, 0, 0, 0, 0, -1, 5, -8, 0, 6, 3, -2, 0, -19, 5, 4, 4, -20, 19, -22, -6, 15, -3, 8, 0, 0, -16, -16, 18, -24, 40, -70, -9, 24, -21, 8, 50, -55, -8, 24, -6, 31, 15, -58, -20, 17, 31, -92, -2, -70, 37, 24, 0, 20, 49, 18, -6, -26, 13, -33, 15, -62, -158, -20, 22, -15, 49, -130, 67, 48, 49, -58, 29, -112, -4, 60, -73, -16
Offset: 1

Views

Author

Antti Karttunen, Nov 19 2021

Keywords

Comments

Dirichlet convolution of A064216 with A323893, which is the Dirichlet inverse of A048673. Therefore, convolving A048673 with this sequence gives A064216.
Note how for n = 1 .. 35, a(n) = -A349398(n).

Crossrefs

Cf. A003961, A048673, A064216, A064989, A323893, A349398 (Dirichlet inverse), A349399 (sum with it), A349384.
Cf. also pairs A349376, A349377 and A349613, A349614 for similar constructions.

Programs

  • PARI
    A048673(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (1/2)*(1+factorback(f)); };
    A064216(n) = { my(f = factor(n+n-1)); 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); };
    memoA323893 = Map();
    A323893(n) = if(1==n,1,my(v); if(mapisdefined(memoA323893,n,&v), v, v = -sumdiv(n,d,if(dA048673(n/d)*A323893(d),0)); mapput(memoA323893,n,v); (v)));
    A349397(n) = sumdiv(n,d,A064216(n/d)*A323893(d));

Formula

a(n) = Sum_{d|n} A064216(n/d) * A323893(d).

A349384 Dirichlet convolution of A003961 with the Dirichlet inverse of A048673, where A003961 is fully multiplicative with a(p) = nextprime(p), and A048673(n) = (1+A003961(n))/2.

Original entry on oeis.org

1, 1, 2, 2, 3, 0, 5, 4, 6, 0, 6, -2, 8, 0, 0, 8, 9, -4, 11, -3, 0, 0, 14, -8, 12, 0, 18, -5, 15, -12, 18, 16, 0, 0, 0, -14, 20, 0, 0, -12, 21, -20, 23, -6, -12, 0, 26, -24, 30, -9, 0, -8, 29, -24, 0, -20, 0, 0, 30, -24, 33, 0, -20, 32, 0, -24, 35, -9, 0, -30, 36, -36, 39, 0, -18, -11, 0, -32, 41, -36, 54, 0, 44
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Comments

Convolving this with A336840 gives A003973.

Crossrefs

Cf. A003961, A048673, A323893, A349385 (Dirichlet inverse), A349386 (sum with it).
Cf. also A003973, A336840, A349572.

Programs

Formula

a(n) = Sum_{d|n} A003961(n/d) * A323893(d).
a(n) = A349386(n) - A349385(n).

A349358 Dirichlet inverse of A064216, which is A064989(2n-1), where A064989 is fully multiplicative with a(2) = 1 and a(p) = prevprime(p) for odd primes p.

Original entry on oeis.org

1, -2, -3, -1, -4, 5, -11, 6, -4, -1, -10, 3, -9, 36, 1, -24, -14, 25, -31, 38, 29, -1, -12, -29, -9, 10, 4, -11, -34, 53, -59, 62, 27, -5, 50, -41, -71, 106, 19, -83, -16, -125, -39, 98, 51, -7, -58, 184, 32, 112, -13, -15, -30, -84, -27, -170, 77, 79, -44, -109, -49, 162, 184, -84, -10, 31, -85, 192, -59, -75, -86
Offset: 1

Views

Author

Antti Karttunen, Nov 17 2021

Keywords

Crossrefs

Programs

  • 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); };
    A064216(n) = A064989((2*n)-1);
    memoA349358 = Map();
    A349358(n) = if(1==n,1,my(v); if(mapisdefined(memoA349358,n,&v), v, v = -sumdiv(n,d,if(dA064216(n/d)*A349358(d),0)); mapput(memoA349358,n,v); (v)));

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A064216(n/d) * a(d).
a(n) = A349359(n) - A064216(n).

A349572 Dirichlet convolution of A000027 (identity function) with the Dirichlet inverse of A048673.

Original entry on oeis.org

1, 0, 0, -1, 1, -2, 1, -4, -4, -3, 4, -4, 4, -5, -6, -12, 7, -6, 7, -7, -10, -6, 8, -6, -4, -8, -24, -11, 13, -2, 12, -32, -12, -9, -14, -4, 16, -11, -16, -13, 19, -2, 19, -16, -22, -14, 20, -4, -18, -15, -18, -20, 23, -10, -14, -19, -22, -15, 28, 14, 27, -18, -34, -80, -20, -8, 31, -25, -28, -8, 34, 14, 33, -20
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2021

Keywords

Comments

Also Dirichlet convolution of A349384 with A349388.

Crossrefs

Cf. A000027, A048673, A323893, A349384, A349388, A349571 (Dirichlet inverse).
Cf. also A349397.

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p]^e; s[1] = 1; s[n_] := (1 + Times @@ f @@@ FactorInteger[n])/2; sinv[1] = 1; sinv[n_] := sinv[n] = -DivisorSum[n, sinv[#] * s[n/#] &, # < n &]; a[n_] := DivisorSum[n, # * sinv[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 23 2021 *)
  • PARI
    A048673(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (1/2)*(1+factorback(f)); };
    memoA323893 = Map();
    A323893(n) = if(1==n,1,my(v); if(mapisdefined(memoA323893,n,&v), v, v = -sumdiv(n,d,if(dA048673(n/d)*A323893(d),0)); mapput(memoA323893,n,v); (v)));
    A349572(n) = sumdiv(n,d,d*A323893(n/d));

Formula

a(n) = Sum_{d|n} d * A323893(n/d).
a(n) = Sum_{d|n} A349384(d) * A349388(n/d).

A378520 Dirichlet inverse of A336840, where A336840 is the inverse Möbius transform of A048673.

Original entry on oeis.org

1, -3, -4, 1, -5, 10, -7, -1, -1, 12, -8, -2, -10, 16, 14, -2, -11, 5, -13, -2, 18, 18, -16, 6, -5, 22, -8, -2, -17, -20, -20, -4, 20, 24, 20, 1, -22, 28, 24, 8, -23, -20, -25, -2, 11, 34, -28, 14, -19, 18, 26, -2, -31, 32, 22, 12, 30, 36, -32, 4, -35, 42, 17, -8, 26, -20, -37, -2, 36, -14, -38, 3, -41, 46, 26, -2, 26
Offset: 1

Views

Author

Antti Karttunen, Nov 30 2024

Keywords

Crossrefs

Möbius transform of A323893.
Dirichlet inverse of A336840.

Programs

  • PARI
    A048673(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (factorback(f)+1)/2; };
    A336840(n) = sumdiv(n,d,A048673(d));
    memoA378520 = Map();
    A378520(n) = if(1==n,1,my(v); if(mapisdefined(memoA378520,n,&v), v, v = -sumdiv(n,d,if(dA336840(n/d)*A378520(d),0)); mapput(memoA378520,n,v); (v)));

Formula

a(1) = 1, and for n > 1, a(n) = -Sum_{d|n, dA336840(n/d) * a(d).
a(n) = Sum_{d|n} A008683(n/d)*A323893(d).
a(n) = A349915(A003961(n)).
Showing 1-10 of 10 results.