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.

Previous Showing 21-30 of 43 results. Next

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

A340147 a(n) = A247074(A003961(n)).

Original entry on oeis.org

1, 1, 1, 3, 1, 2, 1, 9, 5, 3, 1, 3, 1, 5, 6, 27, 1, 10, 1, 9, 10, 6, 1, 18, 7, 8, 25, 15, 1, 3, 1, 81, 3, 9, 15, 15, 1, 11, 4, 27, 1, 5, 1, 9, 10, 14, 1, 27, 11, 21, 18, 6, 1, 50, 2, 45, 22, 15, 1, 18, 1, 18, 50, 243, 24, 12, 1, 27, 7, 3, 1, 90, 1, 20, 21, 33, 30, 16, 1, 81, 125, 21, 1, 30, 3, 23, 30, 54, 1, 15, 40, 21
Offset: 1

Views

Author

Antti Karttunen, Dec 30 2020

Keywords

Comments

Prime shifted analog of A247074.
Each term a(n) is a divisor of A340072(n).

Crossrefs

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A247074(n) = { my(f=factor(n)); eulerphi(f)/prod(i=1, #f~, gcd(f[i, 1]-1, n-1)); }; \\ From A247074
    A340147(n) = A247074(A003961(n));

Formula

a(n) = A247074(A003961(n)).
a(n) = A003972(n) / A340148(n).

A347100 a(n) = phi(A003961(n)) - phi(n), where A003961 is the prime shift towards larger primes, and phi is Euler totient function.

Original entry on oeis.org

0, 1, 2, 4, 2, 6, 4, 14, 14, 8, 2, 20, 4, 14, 16, 46, 2, 34, 4, 28, 28, 14, 6, 64, 22, 20, 82, 48, 2, 40, 6, 146, 28, 20, 36, 108, 4, 26, 40, 92, 2, 68, 4, 52, 96, 34, 6, 200, 68, 64, 40, 72, 6, 182, 32, 156, 52, 32, 2, 128, 6, 42, 164, 454, 48, 76, 4, 76, 68, 96, 2, 336, 6, 44, 128, 96, 60, 104, 4, 292, 446, 44, 6
Offset: 1

Views

Author

Antti Karttunen, Aug 19 2021

Keywords

Comments

Möbius transform of A336853.

Crossrefs

Möbius transform of A336853.
Cf. also A346249, A347098.

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p]^e; a[n_] := EulerPhi[Times @@ f @@@ FactorInteger[n]] - EulerPhi[n]; Array[a, 100] (* Amiram Eldar, Nov 27 2021 *)
  • PARI
    A347100(n) = { my(f=factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (eulerphi(factorback(f))-eulerphi(n)); };
    
  • PARI
    A336853(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); (factorback(f)-n); };
    A347100(n) = sumdiv(n,d,moebius(n/d)*A336853(d));

Formula

a(n) = A003972(n) - A000010(n).
a(n) = A337549(n) + A051953(n).
a(n) = Sum_{d|n} A008683(n/d) * A336853(d).
For all n >= 1, a(A000040(n)) = A001223(n).

A347237 Möbius transform of A347236.

Original entry on oeis.org

1, 0, 1, 6, 1, 0, 3, 6, 17, 0, 1, 6, 3, 0, 1, 42, 1, 0, 3, 6, 3, 0, 5, 6, 37, 0, 49, 18, 1, 0, 5, 78, 1, 0, 3, 102, 3, 0, 3, 6, 1, 0, 3, 6, 17, 0, 5, 42, 89, 0, 1, 18, 5, 0, 1, 18, 3, 0, 1, 6, 5, 0, 51, 330, 3, 0, 3, 6, 5, 0, 1, 102, 5, 0, 37, 18, 3, 0, 3, 42, 353, 0, 5, 18, 1, 0, 1, 6, 7, 0, 9, 30, 5, 0, 3, 78, 3, 0, 17
Offset: 1

Views

Author

Antti Karttunen, Aug 24 2021

Keywords

Comments

Dirichlet convolution of A003972 (prime shifted phi) with A061019.
Dirichlet convolution of A003961 with A158523.
Multiplicative because A003972 and A061019 are, and also because A347236 is.
From Antti Karttunen, Aug 25 2021: (Start)
All terms are nonnegative because sequence is multiplicative and a(p^k) >= 0 for all primes p and k >= 0.
Proof: For any prime p, sequence a(p^k), k>=0, is obtained as an ordinary convolution of sequences (-p)^k and the first differences of q^k, where q = A151800(p). (E.g., for powers of 2, the sequences convolved are A122803 and A025192, giving A102901.) This convolution is an alternating sum, with the terms 1*(q-1)*q^(k-1), -(p)*(q-1)*q^(k-2), (p^2)*(q-1)*q^(k-3), -(p^3)*(q-1)*q^(k-4), ..., (p^(k-1))*(q-1), -(p^k), for odd k, with sum of each consecutive pair being nonnegative because q >= p+1, while with an even exponent k, the leftover term p^k at the end is also positive, thus the whole sum is nonnegative also in that case.
(End)

Crossrefs

Programs

  • PARI
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A061019(n) = (((-1)^bigomega(n))*n);
    A347237(n) = sumdiv(n,d,A061019(d)*eulerphi(A003961(n/d)));
    \\ Or alternatively as:
    A158523(n) = { my(f=factor(n)); prod(i=1, #f~, my(p=f[i,1], e=f[i,2]); ((-1)^e)*(p+1)*(p^(e-1))); };
    A347237(n) = sumdiv(n,d,A003961(n/d)*A158523(d));

Formula

a(n) = Sum_{d|n} A008683(n/d) * A347236(d).
a(n) = Sum_{d|n} A003972(n/d) * A061019(d).
a(n) = Sum_{d|n} A003961(n/d) * A158523(d).
For all n >= 1, a(A000040(n)) = A001223(n) - 1.
For all n >= 0, a(2^n) = A102901(n).
For all n >= 0, a(3^n) = A120612(n).
Multiplicative with a(p^e) = (-p)^e + (A151800(p)-1)*(A151800(p)^e-(-p)^e)/(A151800(p)+p). - Sebastian Karlsson, Sep 02 2021

A349633 Numerators of the Möbius transform of ratio A003961(n)/n.

Original entry on oeis.org

1, 1, 2, 3, 2, 1, 4, 9, 10, 1, 2, 1, 4, 2, 4, 27, 2, 5, 4, 3, 8, 1, 6, 3, 14, 2, 50, 3, 2, 2, 6, 81, 4, 1, 8, 5, 4, 2, 8, 9, 2, 4, 4, 3, 4, 3, 6, 9, 44, 7, 4, 3, 6, 25, 4, 9, 8, 1, 2, 1, 6, 3, 40, 243, 8, 2, 4, 3, 4, 4, 2, 5, 6, 2, 28, 3, 8, 4, 4, 27, 250, 1, 6, 2, 4, 2, 4, 9, 8, 2, 16, 9, 4, 3, 8, 27, 4, 22, 20
Offset: 1

Views

Author

Antti Karttunen, Nov 28 2021

Keywords

Comments

Because the ratio A003961(n)/n is multiplicative, so is also its Möbius transform. This sequence gives the numerator of that ratio when presented in its lowest terms, while A349634 gives the denominators. See the examples.

Examples

			The ratio a(n)/A349634(n) for n = 1..15: 1/1, 1/2, 2/3, 3/4, 2/5, 1/3, 4/7, 9/8, 10/9, 1/5, 2/11, 1/2, 4/13, 2/7, 4/15.
		

Crossrefs

Cf. A000010, A003961, A003972, A008683, A349634 (denominators).
Cf. also A349627.

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p]^e; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; a[n_] := Numerator @ DivisorSum[n, MoebiusMu[n/#] * s[#]/# &]; Array[a, 100] (* Amiram Eldar, Nov 28 2021 *)
  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A349633(n) = numerator(sumdiv(n,d,moebius(n/d)*(A003961(d)/d)));

A349634 Denominators of the Möbius transform of ratio A003961(n)/n.

Original entry on oeis.org

1, 2, 3, 4, 5, 3, 7, 8, 9, 5, 11, 2, 13, 7, 15, 16, 17, 9, 19, 10, 21, 11, 23, 4, 25, 13, 27, 7, 29, 15, 31, 32, 33, 17, 35, 6, 37, 19, 39, 20, 41, 21, 43, 22, 9, 23, 47, 8, 49, 25, 51, 13, 53, 27, 55, 14, 57, 29, 59, 5, 61, 31, 63, 64, 65, 33, 67, 34, 23, 35, 71, 4, 73, 37, 75, 19, 77, 39, 79, 40, 81, 41, 83, 7
Offset: 1

Views

Author

Antti Karttunen, Nov 28 2021

Keywords

Comments

See comments in A349633.

Crossrefs

Cf. A000010, A003961, A003972, A008683, A349633 (numerators).
Cf. also A349628.

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p]^e; s[1] = 1; s[n_] := Times @@ f @@@ FactorInteger[n]; a[n_] := Denominator @ DivisorSum[n, MoebiusMu[n/#] * s[#]/# &]; Array[a, 100] (* Amiram Eldar, Nov 28 2021 *)
  • PARI
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A349634(n) = denominator(sumdiv(n,d,moebius(n/d)*(A003961(d)/d)));

A353797 Numbers k such that k*A003557(A003961(k)) divides A353790(k), where A353790(n) = phi(A003973(n)) * A064989(A003973(n)).

Original entry on oeis.org

1, 2, 4, 44, 132, 220, 396, 660, 1980, 3920, 4400, 8800, 11484, 13200, 13328, 22000, 26400, 30800, 39984, 57420, 66640, 74800, 92400, 119952, 149600, 199920, 224400, 269892, 277200, 448800, 523600, 599760, 673200, 771012, 1063692, 1345792, 1346400, 1570800, 3478608, 4037376, 4712400, 5664400, 6344448, 8038800, 10574080
Offset: 1

Views

Author

Antti Karttunen, May 12 2022

Keywords

Comments

Note that A003557(A003961(n)) [= A003961(A003557(n))] is a divisor of A003972(n), therefore the set of k such that A353789(k) divides A353790(k) is a subset of this sequence.
Of 101 initial terms (terms < 2^32) all others apart from a(1) = 1 and a(2) = 2 are multiples of 4.

Crossrefs

Programs

  • PARI
    A003557(n) = (n/factorback(factorint(n)[, 1]));
    A003961(n) = { my(f = factor(n)); for(i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); };
    A064989(n) = { my(f=factor(n>>valuation(n, 2))); for(i=1, #f~, f[i, 1] = precprime(f[i, 1]-1)); factorback(f); };
    A353790(n) = { my(s=sigma(A003961(n))); (eulerphi(s)*A064989(s)); };
    isA353797(n) = !(A353790(n)%(n*A003557(A003961(n))));

A378220 Dirichlet inverse of phi(A003961(n)), where A003961 is fully multiplicative function with a(prime(i)) = prime(i+1).

Original entry on oeis.org

1, -2, -4, -2, -6, 8, -10, -2, -4, 12, -12, 8, -16, 20, 24, -2, -18, 8, -22, 12, 40, 24, -28, 8, -6, 32, -4, 20, -30, -48, -36, -2, 48, 36, 60, 8, -40, 44, 64, 12, -42, -80, -46, 24, 24, 56, -52, 8, -10, 12, 72, 32, -58, 8, 72, 20, 88, 60, -60, -48, -66, 72, 40, -2, 96, -96, -70, 36, 112, -120, -72, 8, -78, 80, 24
Offset: 1

Views

Author

Antti Karttunen, Nov 23 2024

Keywords

Crossrefs

Dirichlet inverse of A003972.
Inverse Möbius transform of A346234.
After the initial term, A349385 doubled.

Programs

  • Mathematica
    f[p_, e_] := 1 - NextPrime[p]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Jan 13 2025 *)
  • PARI
    A378220(n) = factorback(apply(p -> 1-nextprime(1+p), factor(n)[, 1]));
    
  • Python
    from math import prod
    from sympy import nextprime, primefactors
    def A378220(n): return prod(1-nextprime(p) for p in primefactors(n)) # Chai Wah Wu, Nov 23 2024

Formula

Multiplicative with a(p^e) = (1-q), where q = A151800(p), i.e., the least prime > p.
a(n) = A023900(A003961(n)).
For n > 1, a(n) = 2*A349385(n).
a(n) = Sum_{d|n} A346234(d).
a(n) = Sum_{d|n} A346246(d)*A378216(n/d).

A290082 Restricted growth sequence transform of A289625(A003961(n)).

Original entry on oeis.org

1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 11, 14, 7, 15, 16, 17, 15, 11, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 23, 30, 31, 32, 33, 34, 20, 35, 36, 37, 30, 38, 39, 40, 41, 42, 19, 43, 44, 45, 37, 46, 47, 23, 48, 49, 50, 19, 51, 52, 43, 53, 54, 34, 55, 56, 57, 58, 59, 60, 61, 62, 30, 63, 64, 65, 66, 42, 67, 68, 34, 69, 30, 70, 71, 68, 72, 61
Offset: 1

Views

Author

Antti Karttunen, Jul 20 2017

Keywords

Comments

For all i, j: a(i) = a(j) => A003972(i) = A003972(j).

Crossrefs

Programs

  • PARI
    rgs_transform(invec) = { my(occurrences = Map(), outvec = vector(length(invec)), u=1); for(i=1, length(invec), if(mapisdefined(occurrences,invec[i]), my(pp = mapget(occurrences, invec[i])); outvec[i] = outvec[pp] , mapput(occurrences,invec[i],i); outvec[i] = u; u++ )); outvec; };
    write_to_bfile(start_offset,vec,bfilename) = { for(n=1, length(vec), write(bfilename, (n+start_offset)-1, " ", vec[n])); }
    A003961(n) = { my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); }; \\ This function from Michel Marcus
    A289625(n) = { my(m=1,p=2,v=znstar(n)[2]); for(i=1,length(v),m *= p^v[i]; p = nextprime(p+1)); (m); };
    write_to_bfile(1,rgs_transform(vector(16384,n,A289625(A003961(n)))),"b290082_upto16384.txt");

A339902 Number of prime divisors of A339821(n), counted with multiplicity.

Original entry on oeis.org

0, 1, 2, 3, 2, 3, 4, 5, 2, 3, 4, 5, 4, 5, 6, 7, 3, 4, 5, 6, 5, 6, 7, 8, 5, 6, 7, 8, 7, 8, 9, 10, 4, 5, 6, 7, 6, 7, 8, 9, 6, 7, 8, 9, 8, 9, 10, 11, 7, 8, 9, 10, 9, 10, 11, 12, 9, 10, 11, 12, 11, 12, 13, 14, 3, 4, 5, 6, 5, 6, 7, 8, 5, 6, 7, 8, 7, 8, 9, 10, 6, 7, 8, 9, 8, 9, 10, 11, 8, 9, 10, 11, 10, 11, 12, 13, 7
Offset: 0

Views

Author

Antti Karttunen, Dec 21 2020

Keywords

Crossrefs

Programs

  • PARI
    A339902(n) = { my(s=0, p=2); while(n>0, p = nextprime(1+p); if(n%2, s += bigomega(p-1)); n >>= 1); (s); };

Formula

If 4n = 2^e1 + 2^e2 + ... + 2^ek [e1 ... ek distinct], then a(n) = A023508(e1) + A023508(e2) + ... + A023508(ek).
a(n) = A001222(A339821(n)).
a(n) >= A339822(n).
Previous Showing 21-30 of 43 results. Next