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

A072587 Numbers having at least one prime factor with an even exponent.

Original entry on oeis.org

4, 9, 12, 16, 18, 20, 25, 28, 36, 44, 45, 48, 49, 50, 52, 60, 63, 64, 68, 72, 75, 76, 80, 81, 84, 90, 92, 98, 99, 100, 108, 112, 116, 117, 121, 124, 126, 132, 140, 144, 147, 148, 150, 153, 156, 162, 164, 169, 171, 172, 175, 176, 180, 188, 192, 196, 198, 200, 204
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2002

Keywords

Comments

Complement of the union of {1} and A002035. [Correction, Nov 15 2012]
A162645 is a subsequence and this sequence is a subsequence of A162643. - Reinhard Zumkeller, Jul 08 2009
The asymptotic density of this sequence is 1 - A065463 = 0.2955577990... - Amiram Eldar, Jul 21 2020
A number k is a term iff its core (A007913) properly divides its kernel (A007947), that is iff A336643(k) > 1. - David James Sycamore, Sep 18 2023

Crossrefs

Programs

  • Haskell
    a072587 n = a072587_list !! (n-1)
    a072587_list = tail $ filter (any even . a124010_row) [1..]
    -- Reinhard Zumkeller, Nov 15 2012
    
  • Mathematica
    Select[Range[210], MemberQ[EvenQ[Transpose[FactorInteger[#]][[2]]], True] &] (* Harvey P. Dale, Apr 03 2012 *)
  • PARI
    is(n)=n>3 && Set(factor(n)[,2]%2)[1]==0 \\ Charles R Greathouse IV, Oct 16 2015
    
  • Python
    from itertools import count, islice
    from sympy import factorint
    def A072587_gen(startvalue=1): # generator of terms
        return filter(lambda n:not all(map(lambda m:m&1,factorint(n).values())),count(max(startvalue,1)))
    A072587_list = list(islice(A072587_gen(),30)) # Chai Wah Wu, Jan 04 2023

Extensions

Thanks to Zak Seidov, who noticed that 1 had to be removed. - Reinhard Zumkeller, Nov 15 2012

A350390 a(n) is the largest exponentially odd divisor of n.

Original entry on oeis.org

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

Views

Author

Amiram Eldar, Dec 28 2021

Keywords

Comments

First differs from A331737 at n = 16.

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], p^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~, f[i,1]^(f[i,2] - !(f[i,2]%2)));} \\ Amiram Eldar, Sep 18 2023
  • Python
    from math import prod
    from sympy.ntheory.factor_ import primefactors, core
    def A350390(n): return n*core(n)//prod(primefactors(n)) # Chai Wah Wu, Dec 30 2021
    

Formula

Multiplicative with a(p^e) = p^e if e is odd and p^(e-1) otherwise.
a(n) = n/A336643(n).
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^2*(p+1)) = 0.8073308216... (A306071).
Dirichlet g.f.: zeta(2*s-2) * Product_{p prime} (1 + 1/p^(s-1) - 1/p^(2*s-2) + 1/p^(2*s-1)). - Amiram Eldar, Sep 18 2023

A356191 a(n) is the smallest exponentially odd number that is divisible by n.

Original entry on oeis.org

1, 2, 3, 8, 5, 6, 7, 8, 27, 10, 11, 24, 13, 14, 15, 32, 17, 54, 19, 40, 21, 22, 23, 24, 125, 26, 27, 56, 29, 30, 31, 32, 33, 34, 35, 216, 37, 38, 39, 40, 41, 42, 43, 88, 135, 46, 47, 96, 343, 250, 51, 104, 53, 54, 55, 56, 57, 58, 59, 120, 61, 62, 189, 128, 65
Offset: 1

Views

Author

Amiram Eldar, Jul 29 2022

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[OddQ[e], p^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], f[i,1]^(f[i,2]+1)))};
    
  • PARI
    for(n=1, 100, print1(direuler(p=2, n, 1/(1 - p^2*X^2) * (1 + p*X + p^3*X^2 - p^2*X^2))[n], ", ")) \\ Vaclav Kotesovec, Sep 09 2023

Formula

Multiplicative with a(p^e) = p^e if e is odd and p^(e+1) otherwise.
a(n) = n iff n is in A268335.
a(n) = A064549(n)/A007913(n).
a(n) = n*A336643(n).
a(n) = n^2/A350390(n).
From Vaclav Kotesovec, Sep 09 2023: (Start)
Let f(s) = Product_{p prime} (1 - p^(6-5*s) + p^(7-5*s) + 2*p^(5-4*s) - p^(6-4*s) + p^(3-3*s) - p^(4-3*s) - 2*p^(2-2*s)).
Sum_{k=1..n} a(k) ~ Pi^2 * f(2) * n^2 / 24 * (log(n) + 3*gamma - 1/2 + 12*zeta'(2)/Pi^2 + f'(2)/f(2)), where
f(2) = Product_{p prime} (1 - 4/p^2 + 4/p^3 - 1/p^4) = A256392 = 0.2177787166195363783230075141194468131307977550013559376482764035236264911...,
f'(2) = f(2) * Sum_{p prime} (11*p - 5) * log(p) / (p^3 + p^2 - 3*p + 1) = f(1) * 4.7165968208567630786609552448708126340725121316268495170070986645608062483...
and gamma is the Euler-Mascheroni constant A001620. (End)

A256392 Decimal expansion of Product_{p prime} (1-4/p^2+4/p^3-1/p^4).

Original entry on oeis.org

2, 1, 7, 7, 7, 8, 7, 1, 6, 6, 1, 9, 5, 3, 6, 3, 7, 8, 3, 2, 3, 0, 0, 7, 5, 1, 4, 1, 1, 9, 4, 4, 6, 8, 1, 3, 1, 3, 0, 7, 9, 7, 7, 5, 5, 0, 0, 1, 3, 5, 5, 9, 3, 7, 6, 4, 8, 2, 7, 6, 4, 0, 3, 5, 2, 3, 6, 2, 6, 4, 9, 1, 1, 1, 2, 2, 5, 2, 6, 2, 0, 5, 5, 7, 9, 2, 5, 4, 4, 3, 8, 2, 3, 5, 6, 3, 7, 6, 5, 6, 9, 1, 8, 3, 3, 9
Offset: 0

Views

Author

Juan Arias-de-Reyna, Mar 28 2015

Keywords

Comments

Also decimal expansion of the probability that an integer tuple (x,y,z,w) satisfies gcd(x,y) = gcd(y,z) = gcd(z,w) = gcd(w,x) = 1.

Examples

			0.2177787166195363783230075141...
		

Crossrefs

Programs

  • Mathematica
    Do[Print[N[Exp[-Sum[q = Expand[(4 p^2 - 4 p^3 + p^4)^j]; Sum[PrimeZetaP[Exponent[q[[k]], p]] * Coefficient[q[[k]], p^Exponent[q[[k]], p]], {k, 1, Length[q]}]/j, {j, 1, t}]], 50]], {t, 10, 100, 10}] (* Vaclav Kotesovec, Dec 17 2019 *)
  • PARI
    prodeulerrat(1-4/p^2+4/p^3-1/p^4) \\ Amiram Eldar, Mar 03 2021

A011264 In the prime factorization of n, increment even powers and decrement odd powers (multiplicative).

Original entry on oeis.org

1, 1, 1, 8, 1, 1, 1, 4, 27, 1, 1, 8, 1, 1, 1, 32, 1, 27, 1, 8, 1, 1, 1, 4, 125, 1, 9, 8, 1, 1, 1, 16, 1, 1, 1, 216, 1, 1, 1, 4, 1, 1, 1, 8, 27, 1, 1, 32, 343, 125, 1, 8, 1, 9, 1, 4, 1, 1, 1, 8, 1, 1, 27, 128, 1, 1, 1, 8, 1, 1, 1, 108, 1, 1, 125, 8, 1, 1, 1, 32, 243, 1, 1, 8, 1, 1, 1, 4, 1, 27, 1, 8, 1, 1
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Haskell
    a011264 n = product $ zipWith (^)
                          (a027748_row n) (map a004442 $ a124010_row n)
    -- Reinhard Zumkeller, Jun 23 2013
    
  • Mathematica
    f[n_, k_] := n^(If[EvenQ[k], k + 1, k - 1]); Table[Times @@ f @@@ FactorInteger[n], {n, 94}] (* Jayanta Basu, Aug 14 2013 *)
  • PARI
    a(n) = {my(f = factor(n)); prod(i = 1, #f~, f[i,1]^if(f[i,2]%2, f[i,2]-1, f[i,2]+1));} \\ Amiram Eldar, Jan 07 2023

Formula

a(n) = Product_{k=1..A001221(n)} (A027748(n,k)^A004442(A124010(n,k))). - Reinhard Zumkeller, Jun 23 2013
From Amiram Eldar, Jan 07 2023: (Start)
a(n) = n^2/A011262(n).
a(n) = n*A007947(n)/A007913(n)^2.
a(n) = n*A336643(n)/A007913(n).
a(n) = A356191(n)/A007913(n). (End)
Dirichlet g.f.: zeta(2*s-2) * Product_{p prime} (1 + 1/p^s + 1/p^(2*s-3) - 1/p^(2*s-2)). - Amiram Eldar, Sep 21 2023
From Vaclav Kotesovec, May 06 2025: (Start)
Dirichlet g.f.: zeta(2*s-3) * Product_{p prime} (1 + (p-1)*p^(3-2*s) + p^(1-s) - (p-1)*(p^s + p^3)/(p^(2*s) - p^2)).
Sum_{k=1..n} a(k) ~ n^2/4. (End)

A240502 Product of primes appearing in the factorization of n! with even exponents.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 6, 6, 3, 3, 30, 30, 10, 10, 35, 21, 21, 21, 42, 42, 210, 10, 55, 55, 330, 330, 2145, 715, 5005, 5005, 6006, 6006, 3003, 91, 3094, 2210, 2210, 2210, 20995, 4845, 1938, 1938, 2261, 2261, 24871, 124355, 5720330, 5720330, 17160990, 17160990, 8580495
Offset: 0

Views

Author

Vladimir Shevelev, Apr 06 2014

Keywords

Comments

All terms are squarefree (A005117). - Michel Marcus, Feb 15 2016

Examples

			In the prime power factorization 2^7*3^4*5*7 of 9! only the exponent of 3 is even. Thus a(9)=3.
		

Crossrefs

Programs

  • Mathematica
    Table[Times@@Select[FactorInteger[n!],EvenQ[#[[2]]]&][[;;,1]],{n,0,50}] (* Harvey P. Dale, Feb 24 2023 *)
  • PARI
    a(n) = {my(f = factor(n!)); for (k=1, #f~, f[k, 2] = 1 - (f[k, 2] % 2);); factorback(f);} \\ Michel Marcus, Feb 15 2016
    
  • PARI
    a(n) = {my(res=1); forprime(p=2, n\2, e=val(n,p); if(e%2==0,res*=p)); res}
    val(n, p) = my(r=0); while(n, r+=n\=p); r \\ David A. Corneth, Feb 24 2023

Formula

a(n) = rad(n!)/core(n!) = A336643(n!). - Benoit Cloitre, Mar 12 2022

Extensions

More terms from Michel Marcus, Feb 15 2016

A336644 a(n) = (n-rad(n)) / core(n), where rad(n) and core(n) give the squarefree kernel and squarefree part of n, respectively.

Original entry on oeis.org

0, 0, 0, 2, 0, 0, 0, 3, 6, 0, 0, 2, 0, 0, 0, 14, 0, 6, 0, 2, 0, 0, 0, 3, 20, 0, 8, 2, 0, 0, 0, 15, 0, 0, 0, 30, 0, 0, 0, 3, 0, 0, 0, 2, 6, 0, 0, 14, 42, 20, 0, 2, 0, 8, 0, 3, 0, 0, 0, 2, 0, 0, 6, 62, 0, 0, 0, 2, 0, 0, 0, 33, 0, 0, 20, 2, 0, 0, 0, 14, 78, 0, 0, 2, 0, 0, 0, 3, 0, 6, 0, 2, 0, 0, 0, 15, 0, 42, 6, 90, 0, 0, 0, 3, 0
Offset: 1

Views

Author

Antti Karttunen, Jul 28 2020

Keywords

Crossrefs

Programs

  • PARI
    A336644(n) = ((n-factorback(factorint(n)[, 1])) / core(n));
    
  • Python
    from math import prod
    from sympy.ntheory.factor_ import primefactors, core
    def A336644(n): return (n-prod(primefactors(n)))//core(n) # Chai Wah Wu, Dec 30 2021

Formula

a(n) = A066503(n) / A007913(n) = (n-A007947(n)) / A007913(n).
a(n) = A008833(n) - A336643(n).

A072588 Numbers having at least one prime factor with an odd and one with an even exponent.

Original entry on oeis.org

12, 18, 20, 28, 44, 45, 48, 50, 52, 60, 63, 68, 72, 75, 76, 80, 84, 90, 92, 98, 99, 108, 112, 116, 117, 124, 126, 132, 140, 147, 148, 150, 153, 156, 162, 164, 171, 172, 175, 176, 180, 188, 192, 198, 200, 204, 207, 208, 212, 220, 228, 234, 236, 240, 242, 244
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 23 2002

Keywords

Comments

= Complement(Union(A002035, A000290)) = Intersection(A000037, A072587);
a(k)=A070011(k) for 0A070011(26)=120 is not a term, as 120=5*3*2^3 having only odd exponents (A002035(85)=120), and a(54)=240 is not a term of A070011, as from 240=5*3*2^4 follows that A001222(240)/A001221(240)=6/3=2 is an integer.
The asymptotic density of this sequence is 1 - A065463 = 0.2955577990... - Amiram Eldar, Sep 18 2022
Numbers k such that A007913(k) properly divides A007947(k). (Same as A072587 without square terms). A number k is in this sequence iff 1 < A007913(k) < A007947(k) < k, and A007913(k)|A007947(k), equivalently iff k is not in A000037 and A336643(k) is squarefree. - David James Sycamore, Sep 20 2023

Crossrefs

Programs

  • Haskell
    a072588 n = a072588_list !! (n-1)
    a072588_list = filter f [1..] where
       f x = any odd es && any even es  where es = a124010_row x
    -- Reinhard Zumkeller, Nov 15 2012
    
  • Mathematica
    oeeQ[n_]:=Module[{fi=Transpose[FactorInteger[n]][[2]]},Count[fi,?OddQ]>0  && Count[fi,?EvenQ]>0]; Select[Range[250],oeeQ] (* Harvey P. Dale, Jun 21 2015 *)
  • PARI
    is(n)=#Set(factor(n)[,2]%2)==2 \\ Charles R Greathouse IV, Oct 16 2015

A367990 Sum of the squarefree divisors of the largest unitary divisor of n that is a square.

Original entry on oeis.org

1, 1, 1, 3, 1, 1, 1, 1, 4, 1, 1, 3, 1, 1, 1, 3, 1, 4, 1, 3, 1, 1, 1, 1, 6, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 12, 1, 1, 1, 1, 1, 1, 1, 3, 4, 1, 1, 3, 8, 6, 1, 3, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 4, 3, 1, 1, 1, 3, 1, 1, 1, 4, 1, 1, 6, 3, 1, 1, 1, 3, 4, 1, 1, 3, 1, 1, 1
Offset: 1

Views

Author

Amiram Eldar, Dec 07 2023

Keywords

Crossrefs

Programs

  • Mathematica
    f[p_, e_] := If[EvenQ[e], p + 1, 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]+1, 1));}

Formula

Multiplicative with a(p^e) = p + 1 if e is even and 1 otherwise.
a(n) = A048250(A350388(n)).
a(n) = A000203(A336643(n)).
a(n) = A048250(n)/A367991(n).
a(n) >= 1, with equality if and only if n is an exponentially odd number (A268335).
Dirichlet g.f.: zeta(2*s) * Product_{p prime} (1 + 1/p^s + 1/p^(2*s-1)).
From Vaclav Kotesovec, Apr 20 2025: (Start)
Dirichlet g.f.: zeta(s) * zeta(2*s-1) * Product_{p prime} ((p^(2*s) - p) * (p^(2*s) + p^s + p) / ((p^s+1) * p^(3*s))).
Let f(s) = Product_{p prime} ((p^(2*s)-p) * (p^(2*s)+p^s+p) / ((p^s+1) * p^(3*s))).
Sum_{k=1..n} a(k) ~ f(1) * n * (log(n) + 3*gamma - 1 + f'(1)/f(1)) / 2, where
f(1) = A307868 = Product_{p prime} (1 - 2/(p*(p+1))) = 0.4716806136129978680752356330804820874259263820069868836357372554177321167...
f'(1) = f(1) * Sum_{p prime} (7*p + 5) * log(p) / ((p-1)*(p+1)*(p+2)) = f(1) * 3.0570993566532132522378281945383016697995408795919384628849894110222383828...
and gamma is the Euler-Mascheroni constant A001620. (End)
Showing 1-9 of 9 results.