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.

A350389 a(n) is the largest unitary divisor of n that is an exponentially odd number (A268335).

Original entry on oeis.org

1, 2, 3, 1, 5, 6, 7, 8, 1, 10, 11, 3, 13, 14, 15, 1, 17, 2, 19, 5, 21, 22, 23, 24, 1, 26, 27, 7, 29, 30, 31, 32, 33, 34, 35, 1, 37, 38, 39, 40, 41, 42, 43, 11, 5, 46, 47, 3, 1, 2, 51, 13, 53, 54, 55, 56, 57, 58, 59, 15, 61, 62, 7, 1, 65, 66, 67, 17, 69, 70, 71
Offset: 1

Views

Author

Amiram Eldar, Dec 28 2021

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], p^e, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, if(f[i,2]%2, f[i,1]^f[i,2], 1));} \\ Amiram Eldar, Sep 18 2023
  • Python
    from math import prod
    from sympy import factorint
    def A350389(n): return prod(p**e if e % 2 else 1 for p, e in factorint(n).items()) # Chai Wah Wu, Feb 24 2022
    

Formula

Multiplicative with a(p^e) = p^e if e is odd and 1 otherwise.
a(n) = n/A350388(n).
A001222(a(n)) = A350387(n).
a(n) = 1 if and only if n is a positive square (A000290 \ {0}).
a(n) = n if and only if n is an exponentially odd number (A268335).
Sum_{k=1..n} a(k) ~ (1/2)*c*n^2, where c = Product_{p prime} (1 - p/(1+p+p^2+p^3)) = 0.7406196365...
Dirichlet g.f.: zeta(2*s-2) * zeta(2*s) * Product_{p prime} (1 + 1/p^(s-1) - 1/p^(2*s-2) - 1/p^(3*s-1)). - Amiram Eldar, Sep 18 2023

A350386 a(n) is the sum of the even exponents in the prime factorization of n.

Original entry on oeis.org

0, 0, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 4, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2, 2, 0, 0, 4, 2, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 6, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 2, 2, 0, 0, 0, 4, 4, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 2, 2, 4, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Amiram Eldar, Dec 28 2021

Keywords

Comments

a(n) is the number of prime divisors of n, counted with multiplicity, with an even exponent in the prime factorization of n.
All the terms are even by definition.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[EvenQ[e], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = my(f=factor(n)); sum(k=1, #f~, if (!(f[k, 2] % 2), f[k, 2])); \\ Michel Marcus, Dec 29 2021
  • Python
    from sympy import factorint
    def a(n): return sum(e for e in factorint(n).values() if e%2 == 0)
    print([a(n) for n in range(1, 106)]) # Michael S. Branicky, Dec 28 2021
    

Formula

Additive with a(p^e) = e if e is even and 0 otherwise.
a(n) = A001222(A350388(n)).
a(n) = 0 if and only if n is an exponentially odd number (A268335).
a(n) = A001222(n) - A350387(n).
a(n) = A001222(n) if and only if n is a positive square (A000290 \ {0}).
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = Sum_{p prime} 2*p/((p-1)*(p+1)^2) = 0.7961706018...

A367169 a(n) is the sum of the exponents in the prime factorization of n that are powers of 2.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 1, 0, 2, 2, 1, 3, 1, 2, 2, 4, 1, 3, 1, 3, 2, 2, 1, 1, 2, 2, 0, 3, 1, 3, 1, 0, 2, 2, 2, 4, 1, 2, 2, 1, 1, 3, 1, 3, 3, 2, 1, 5, 2, 3, 2, 3, 1, 1, 2, 1, 2, 2, 1, 4, 1, 2, 3, 0, 2, 3, 1, 3, 2, 3, 1, 2, 1, 2, 3, 3, 2, 3, 1, 5, 4, 2, 1, 4, 2, 2, 2
Offset: 1

Views

Author

Amiram Eldar, Nov 07 2023

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[e == 2^IntegerExponent[e, 2], e, 0]; a[1] = 0; a[n_] := Plus @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = {my(f = factor(n)); sum(i = 1, #f~, if(f[i, 2] == 1 << valuation(f[i, 2], 2), f[i, 2], 0));}
    
  • Python
    from sympy import factorint
    def A367169(n): return sum(e for e in factorint(n).values() if not(e&-e)^e) # Chai Wah Wu, Nov 10 2023

Formula

a(n) = A001222(A367168(n)).
Additive with a(p^e) = A048298(e).
a(n) <= A001222(n), with equality if and only if n is in A138302.
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = -P(2) + Sum_{k>=1} 2^k * (P(2^k) - P(2^k+1)) = 0.28425245481079272416..., where P(s) is the prime zeta function.

A332423 If n = Product (p_j^k_j) then a(n) = Sum ((-1)^(k_j + 1) * k_j).

Original entry on oeis.org

0, 1, 1, -2, 1, 2, 1, 3, -2, 2, 1, -1, 1, 2, 2, -4, 1, -1, 1, -1, 2, 2, 1, 4, -2, 2, 3, -1, 1, 3, 1, 5, 2, 2, 2, -4, 1, 2, 2, 4, 1, 3, 1, -1, -1, 2, 1, -3, -2, -1, 2, -1, 1, 4, 2, 4, 2, 2, 1, 0, 1, 2, -1, -6, 2, 3, 1, -1, 2, 3, 1, 1, 1, 2, -1, -1, 2, 3, 1, -3
Offset: 1

Views

Author

Ilya Gutkovskiy, Feb 12 2020

Keywords

Comments

Sum of odd exponents in prime factorization of n minus the sum of even exponents in prime factorization of n.

Examples

			a(2700) = a(2^2 * 3^3 * 5^2) = -2 + 3 - 2 = -1.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Plus @@ ((-1)^(#[[2]] + 1) #[[2]] & /@ FactorInteger[n]); a[1] = 0; Table[a[n], {n, 1, 80}]
  • PARI
    a(n) = vecsum(apply(x -> (-1)^(x+1) * x, factor(n)[, 2])); \\ Amiram Eldar, Oct 09 2023

Formula

From Amiram Eldar, Oct 09 2023: (Start)
Additive with a(p^e) = (-1)^(e+1) * e.
a(n) = A350387(n) - A350386(n).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B - C), where B is Mertens's constant (A077761) and C = Sum_{p prime} (3*p+1)/(p*(p+1)^2) = 0.81918453457738985491 ... . (End)

A356413 Numbers with an equal sum of the even and odd exponents in their prime factorizations.

Original entry on oeis.org

1, 60, 84, 90, 126, 132, 140, 150, 156, 198, 204, 220, 228, 234, 260, 276, 294, 306, 308, 315, 340, 342, 348, 350, 364, 372, 380, 414, 444, 460, 476, 490, 492, 495, 516, 522, 525, 532, 550, 558, 564, 572, 580, 585, 620, 636, 644, 650, 666, 693, 708, 726, 732, 735
Offset: 1

Views

Author

Amiram Eldar, Aug 06 2022

Keywords

Comments

Numbers k such that A350386(k) = A350387(k).
A085987 is a subsequence. Terms that are not in A085987 are 1, 2160, 3024, ...

Examples

			60 is a term since A350386(60) = A350387(60) = 2.
		

Crossrefs

Subsequence of A028260.
Subsequences: A085987, A179698, A190109, A190110.
Similar sequences: A048109, A187039, A348097.

Programs

  • Mathematica
    f[p_, e_] := (-1)^e*e; q[1] = True; q[n_] := Plus @@ f @@@ FactorInteger[n] == 0; Select[Range[1000], q]
  • PARI
    isok(n) = {my(f = factor(n)); sum(i = 1, #f~, (-1)^f[i,2]*f[i,2]) == 0};

A370079 The product of the odd exponents of the prime factorization of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Feb 09 2024

Keywords

Comments

First differs from A363329 at n = 32.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], e, 1]; a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100]
  • PARI
    a(n) = vecprod(apply(x -> if(x%2, x, 1), factor(n)[, 2]));

Formula

a(n) = A005361(A350389(n)).
Multiplicative with a(p^e) = e if e is odd, and 1 if e is even.
a(n) = A005361(n)/A370080(n).
a(n) >= 1, with equality if and only if n is in A335275.
a(n) <= A005361(n), with equality if and only if n is an exponentially odd number (A268335).
Dirichlet g.f.: zeta(2*s)^2 * Product_{p prime} (1 + 1/p^s - 1/p^(2*s) + 1/p^(3*s)).
Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = zeta(2)^2 * Product_{p prime} (1 - 2/p^2 + 2/p^3 - 1/p^4) = 1.32800597172596287374... .
Dirichlet g.f.: zeta(s) * Product_{p prime} (1 + 2/((p^s - 1)*(p^s + 1)^2)). - Vaclav Kotesovec, Feb 11 2024

A371600 Numbers of least prime signature (A025487) whose prime factorization has equal sum of even and odd exponents.

Original entry on oeis.org

1, 60, 2160, 12600, 18480, 77760, 180180, 216000, 453600, 665280, 2646000, 2799360, 3880800, 7776000, 10810800, 16329600, 16336320, 23950080, 32016600, 45360000, 66528000, 95256000, 100776960, 139708800, 214414200, 232792560, 279936000, 389188800, 555660000, 587865600
Offset: 1

Views

Author

Amiram Eldar, Mar 29 2024

Keywords

Examples

			The prime signatures of the first 12 terms are:
   n     a(n)     signature  A350386(a(n)) = A350387(a(n))
  --  -------  ------------  -------------   -------------
   1        1            {}             0                0
   2       60       {1,1,2}             2            1+1=2
   3     2160       {1,3,4}             4            1+3=4
   4    12600     {1,2,2,3}         2+2=4            1+3=4
   5    18480   {1,1,1,1,4}             4        1+1+1+1=4
   6    77760       {1,5,6}             6            1+5=6
   7   180180 {1,1,1,1,2,2}         2+2=4        1+1+1+1=4
   8   216000       {3,3,6}             6            3+3=6
   9   453600     {1,2,4,5}         2+4=6            1+5=6
  10   665280   {1,1,1,3,6}             6        1+1+1+3=6
  11  2646000     {2,3,3,4}         2+4=6            3+3=6
  12  2799360       {1,7,8}             8            1+7=8
		

Crossrefs

Intersection of A025487 and A356413.

Programs

  • Mathematica
    fun[p_, e_] := (-1)^e * e; q[n_] := Module[{f = FactorInteger[n]}, n == 1 || (f[[-1, 1]] == Prime[Length[f]] && Plus @@ fun @@@ f == 0 && Max@ Differences[f[[;; , 2]]] < 1)]; Select[Range[4*10^6], q]
  • PARI
    is(n) = {my(f = factor(n), p = f[, 1], e = f[, 2]); n == 1 || (sum(i = 1, #e, (-1)^e[i] * e[i]) == 0 && e == vecsort(e, , 4) && primepi(p[#p]) == #p);}

A356414 Number k such that k and k+1 both have an equal sum of even and odd exponents in their prime factorization (A356413).

Original entry on oeis.org

819, 1035, 1196, 1274, 1275, 1449, 1665, 1924, 1925, 1988, 2324, 2331, 2540, 3068, 3195, 3324, 3339, 3549, 3555, 3626, 3717, 4164, 4220, 4235, 4556, 4598, 4635, 4675, 4796, 5084, 5525, 5634, 5660, 6003, 6027, 6068, 6164, 6363, 6740, 6867, 6908, 7028, 7227, 7275
Offset: 1

Views

Author

Amiram Eldar, Aug 06 2022

Keywords

Comments

Numbers k such that A350386(k) = A350387(k) and A350386(k+1) = A350387(k+1).

Examples

			819 is a term since A350386(819) = A350387(819) = 2 and A350386(820) = A350387(820) = 2.
		

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := (-1)^e*e; q[1] = True; q[n_] := Plus @@ f @@@ FactorInteger[n] == 0; Select[Range[10^4], q[#] && q[# + 1] &]
  • PARI
    is(n) = {my(f = factor(n)); sum(i = 1, #f~, (-1)^f[i,2]*f[i,2]) == 0};
    is1 = is(1); for(k = 2, 10^4, is2 = is(k); if(is1 && is2, print1(k-1,", ")); is1 = is2);
Showing 1-8 of 8 results.