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.

A348046 Positions of 2's in A348045.

Original entry on oeis.org

5, 8, 9, 10, 12, 14, 15, 26, 38, 62, 86, 122, 146, 206, 218, 278, 302, 362, 386, 398, 458, 482, 542, 566, 626, 698, 842, 866, 926, 1046, 1142, 1202, 1238, 1286, 1322, 1622, 1646, 1658, 1718, 1766, 2042, 2066, 2102, 2126, 2186, 2306, 2462, 2558, 2582, 2606, 2642, 2858, 2906, 2966, 2978, 3218, 3242, 3338, 3398, 3446
Offset: 1

Views

Author

Antti Karttunen, Oct 12 2021

Keywords

Comments

The only odd terms in this sequence are 5, 9 and 15.

Crossrefs

Cf. A176810 (subsequence), A348045.

Programs

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

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

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

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

A349348 Dirichlet inverse 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, -1, -2, -1, -3, 1, -5, -1, 0, 1, -7, 2, -11, 3, 6, -1, -13, -1, -17, 3, 10, 3, -19, 3, 0, 9, 0, 5, -23, -1, -29, -1, 14, 9, 15, 1, -31, 15, 22, 5, -37, -3, -41, 7, 0, 15, -43, 4, 0, -4, 26, 11, -47, -3, 21, 7, 34, 17, -53, -2, -59, 27, 0, -1, 33, -3, -61, 13, 38, -3, -67, 2, -71, 25, 0, 17, 35, -9, -73, 7, 0, 33
Offset: 1

Views

Author

Antti Karttunen, Nov 15 2021

Keywords

Crossrefs

Coincides with A349125 on odd numbers.
Cf. also A348045, A349437, A349438.

Programs

  • PARI
    up_to = 20000;
    DirInverseCorrect(v) = { my(u=vector(#v)); u[1] = (1/v[1]); for(n=2, #v, u[n] = (-u[1]*sumdiv(n, d, if(dA064989(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));
    v349348 = DirInverseCorrect(vector(up_to,n,A252463(n)));
    A349348(n) = v349348[n];

Formula

a(1) = 1; a(n) = -Sum_{d|n, d < n} A252463(n/d) * a(d).
a(n) = A349349(n) - A252463(n).
For all n >= 1, a(2n-1) = A349125(2n-1).

A349437 Dirichlet convolution of A252463 with A055615 (Dirichlet inverse of n), 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, -1, -1, 0, -2, 2, -2, 0, -2, 4, -4, 0, -2, 4, 2, 0, -4, 4, -2, 0, 2, 8, -4, 0, -6, 4, -4, 0, -6, -4, -2, 0, 4, 8, 4, 0, -6, 4, 2, 0, -4, -4, -2, 0, 4, 8, -4, 0, -10, 12, 4, 0, -6, 8, 8, 0, 2, 12, -6, 0, -2, 4, 4, 0, 4, -8, -6, 0, 4, -8, -4, 0, -2, 12, 6, 0, 8, -4, -6, 0, -8, 8, -4, 0, 8, 4, 6, 0, -6, -8, 4, 0, 2
Offset: 1

Views

Author

Antti Karttunen, Nov 18 2021

Keywords

Comments

Dirichlet convolution of this sequence with Euler phi (A000010) is A348045.

Crossrefs

Cf. A055615, A064989, A252463, A349438 (Dirichlet inverse), A349439 (sum with it).
Cf. also A000010, A348045.

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p, -1]^e; s[1] = 1; s[n_] := If[EvenQ[n], n/2, Times @@ f @@@ FactorInteger[n]]; a[n_] := DivisorSum[n, # * MoebiusMu[#] * s[n/#] &]; Array[a, 100] (* Amiram Eldar, Nov 18 2021 *)
  • PARI
    A055615(n) = (n*moebius(n));
    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));
    A349437(n) = sumdiv(n,d,A055615(n/d)*A252463(d));

Formula

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

A349438 Dirichlet convolution of A000027 with A349348 (Dirichlet inverse 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, 1, 1, 1, 2, 0, 2, 1, 3, 0, 4, -1, 2, 0, 2, 1, 4, -1, 2, -2, 2, 0, 4, -2, 10, 0, 9, -2, 6, -4, 2, 1, 4, 0, 4, -4, 6, 0, 2, -4, 4, -4, 2, -4, 6, 0, 4, -3, 14, -4, 4, -2, 6, -6, 8, -4, 2, 0, 6, -6, 2, 0, 6, 1, 4, -8, 6, -4, 4, -8, 4, -6, 2, 0, 10, -2, 8, -4, 6, -6, 27, 0, 4, -6, 8, 0, 6, -8, 6, -16, 4, -4, 2, 0, 4
Offset: 1

Views

Author

Antti Karttunen, Nov 18 2021

Keywords

Comments

Convolving this sequence with A348045 gives Euler phi, A000010.
It might first seem that A000265(a(p^k)) = p^(k-1) for all odd primes and all exponents k >= 1, but this does not hold for prime 37. However, with p=37, identity A065330(A349438(37^k)) = 37^(k-1) seems to hold for all exponents k >= 1. - Antti Karttunen, Nov 20 2021

Crossrefs

Cf. A000027, A064989, A252463, A349348, A349437 (Dirichlet inverse), A349439 (sum with it).

Programs

  • Mathematica
    f[p_, e_] := NextPrime[p, -1]^e; s[1] = 1; s[n_] := If[EvenQ[n], n/2, Times @@ f @@@ FactorInteger[n]]; 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 18 2021 *)
  • 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));
    memoA349348 = Map();
    A349348(n) = if(1==n,1,my(v); if(mapisdefined(memoA349348,n,&v), v, v = -sumdiv(n,d,if(dA252463(n/d)*A349348(d),0)); mapput(memoA349348,n,v); (v)));
    A349438(n) = sumdiv(n,d,d*A349348(n/d));

Formula

a(n) = Sum_{d|n} d * A349348(n/d).
Showing 1-8 of 8 results.