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 11-20 of 20 results.

A055205 Number of nonsquare divisors of n^2.

Original entry on oeis.org

0, 1, 1, 2, 1, 5, 1, 3, 2, 5, 1, 9, 1, 5, 5, 4, 1, 9, 1, 9, 5, 5, 1, 13, 2, 5, 3, 9, 1, 19, 1, 5, 5, 5, 5, 16, 1, 5, 5, 13, 1, 19, 1, 9, 9, 5, 1, 17, 2, 9, 5, 9, 1, 13, 5, 13, 5, 5, 1, 33, 1, 5, 9, 6, 5, 19, 1, 9, 5, 19, 1, 23, 1, 5, 9, 9, 5, 19, 1, 17, 4, 5, 1, 33, 5, 5, 5, 13, 1, 33, 5, 9, 5, 5, 5
Offset: 1

Views

Author

Labos Elemer, Jun 19 2000

Keywords

Comments

Seems to be equal to the number of unordered pairs of coprime divisors of n. (Checked up to 2*10^14.) - Charles R Greathouse IV, May 03 2013
Outline of a proof for this observation, R. J. Mathar, May 05 2013: (Start)
i) To construct the divisors of n, write n=product_i p_i^e_i as the standard prime power decomposition, take any subset of the primes p_i (including the empty set representing the 1) and run with the associated list exponents from 0 up to their individual e_i.
To construct the *nonsquare* divisors of n, ensure that one or more of the associated exponents is/are odd. (The empty set is interpreted as 1^0 with even exponent.) To construct the nonsquare divisors of n^2, the principle remains the same, although the exponents may individually range from 0 up to 2*e_i.
The nonsquare divisor is therefore a nonempty product of prime powers (at least one) with odd exponents times a (potentially empty) product of prime powers (of different primes) with even exponents.
The nonsquare divisors of n^2 have exponents from 0 up to 2*e_i, but the subset of exponents in the "even/square" factor has e_i candidates (range 2, 4, .., 2*e_i) and in the "odd/nonsquare" factor also only e_i candidates (range 1,3,5,2*e_i-1).
ii) To construct the pairs of coprime divisors of n, take any two non-intersecting subsets of the set of p_i (possibly the empty subset which represents the factor 1), and let the exponents run from 1 up to their individual e_i in each of the two products.
iii) The bijection between the sets constructed in i) and ii) is given by mapping the two non-intersection prime sets onto each other, and observing that the numbers of compositions of exponents have the same orders in both cases.
(End)

Examples

			n = 8, d(64) = 7 and from the 7 divisors {1,4,16,64} are square and the remaining 3 = a(8).
n = 12, d(144) = 15, from which 6 divisors are squares {1,4,9,16,36,144} so a(12) = d(144)-d(12) = 9
a(60) = (number of terms of finite A171425) = 33. [_Reinhard Zumkeller_, Dec 08 2009]
		

Crossrefs

Programs

  • Haskell
    a055205 n = length [d | d <- [1..n^2], n^2 `mod` d == 0, a010052 d == 0]
    -- Reinhard Zumkeller, Aug 15 2011
    
  • Mathematica
    Table[Count[Divisors[n^2], d_ /;  ! IntegerQ[Sqrt[d]]], {n, 1, 95}] (* Jean-François Alcover, Mar 22 2011 *)
    Table[DivisorSigma[0,n^2]-DivisorSigma[0,n],{n,100}] (* Harvey P. Dale, Sep 02 2017 *)
  • PARI
    a(n)=my(f=factor(n)[,2]);prod(i=1,#f,2*f[i]+1)-prod(i=1,#f,f[i]+1) \\ Charles R Greathouse IV, May 02 2013

Formula

a(n) = A000005(n^2)-A000005(n) because the number of square divisors of n^2 equals the number of divisors of n.
a(n) = A056595(A000290(n)).
a(n) = A048691(n) - A000005(n). - Reinhard Zumkeller, Dec 08 2009
Sum_{k=1..n} a(k) ~ (n/zeta(2)) * (log(n)^2/2 + c_1 * log(n) + c_2), where c_1 = 3*gamma - 2*zeta'(2)/zeta(2) - zeta(2) - 1 = 0.226634..., c_2 = 3*gamma^2 - (2*gamma - 1)*zeta(2) - 3*gamma_1 + (1 - 3*gamma)*(2*zeta'(2)/zeta(2) + 1) + (2*zeta'(2)/zeta(2))^2 - 2*zeta''(2)/zeta(2) = -0.0529271..., gamma is Euler's constant (A001620), and gamma_1 is the first Stieltjes constant (A082633). - Amiram Eldar, Dec 01 2023

A293514 a(n) = Product_{d|n, d>1} prime(A286561(n,d)), where A286561(n,d) gives the highest exponent of d dividing n.

Original entry on oeis.org

1, 2, 2, 6, 2, 8, 2, 20, 6, 8, 2, 48, 2, 8, 8, 84, 2, 48, 2, 48, 8, 8, 2, 320, 6, 8, 20, 48, 2, 128, 2, 264, 8, 8, 8, 864, 2, 8, 8, 320, 2, 128, 2, 48, 48, 8, 2, 2688, 6, 48, 8, 48, 2, 320, 8, 320, 8, 8, 2, 3072, 2, 8, 48, 1560, 8, 128, 2, 48, 8, 128, 2, 11520, 2, 8, 48, 48, 8, 128, 2, 2688, 84, 8, 2, 3072, 8, 8, 8, 320
Offset: 1

Views

Author

Antti Karttunen, Nov 11 2017

Keywords

Examples

			For n = 24, its divisors larger than one are: 2, 3, 4, 6, 8, 12, 24. Only 2 has valuation > 1, namely A286561(24,2) = 3 (as 2^3 divides 24), while the other six have valuation 1. Thus a(24) = prime(1)^6 * prime(3) = 64*5 = 320.
For n = 64, its divisors larger than one are: 2, 4, 8, 16, 32, 64. We see that 2^6 = 4^3 = 8^2 = 64, while valuation of the last three 16, 32 and 64 is 1. Thus a(64) = prime(1)^3 * prime(2) * prime(3) * prime(6) = 2^3 * 3 * 5 * 13 = 1560.
		

Crossrefs

Programs

  • PARI
    A293514(n) = { my(m=1); fordiv(n,d,if(d>1, m *= prime(valuation(n,d)))); m; };

Formula

a(n) = Product_{d|n, d>1} A000040(A286561(n,d)).
Other identities. For all n >= 1:
A001222(a(n)) = A032741(n).
A007814(a(n)) = A056595(n) [See A046951.]
1+A056239(a(n)) = A169594(n).
A064989(a(n)) = A293515(n).

A294873 a(n) = Product_{d|n, d>1, d = x^(2k-1) for some maximal k >= 1} prime(k).

Original entry on oeis.org

1, 2, 2, 2, 2, 8, 2, 6, 2, 8, 2, 16, 2, 8, 8, 6, 2, 16, 2, 16, 8, 8, 2, 96, 2, 8, 6, 16, 2, 128, 2, 30, 8, 8, 8, 32, 2, 8, 8, 96, 2, 128, 2, 16, 16, 8, 2, 192, 2, 16, 8, 16, 2, 96, 8, 96, 8, 8, 2, 1024, 2, 8, 16, 30, 8, 128, 2, 16, 8, 128, 2, 384, 2, 8, 16, 16, 8, 128, 2, 192, 6, 8, 2, 1024, 8, 8, 8, 96, 2, 1024, 8, 16, 8, 8, 8, 1920, 2, 16, 16, 32, 2, 128, 2
Offset: 1

Views

Author

Antti Karttunen, Nov 11 2017

Keywords

Crossrefs

Programs

  • PARI
    A294873(n) = { my(m=1,e); fordiv(n,d, if(d>1, e = ispower(d); if(!e, m += m, if((e>1)&&(e%2), m *= prime((e+1)/2))))); m; };

Formula

a(n) = Product_{d|n, d>1, r = A052409(d) is odd} A000040((r+1)/2).
Other identities. For all n >= 1:
A001222(a(n)) = A056595(n).
A007814(a(n)) = A183096(n).

A285309 Sum of nonsquare divisors of n.

Original entry on oeis.org

0, 2, 3, 2, 5, 11, 7, 10, 3, 17, 11, 23, 13, 23, 23, 10, 17, 29, 19, 37, 31, 35, 23, 55, 5, 41, 30, 51, 29, 71, 31, 42, 47, 53, 47, 41, 37, 59, 55, 85, 41, 95, 43, 79, 68, 71, 47, 103, 7, 67, 71, 93, 53, 110, 71, 115, 79, 89, 59, 163, 61, 95, 94, 42, 83, 143, 67, 121, 95, 143, 71, 145, 73, 113, 98
Offset: 1

Views

Author

Ilya Gutkovskiy, Apr 16 2017

Keywords

Examples

			a(6) = 11 because 6 has 4 divisors {1, 2, 3, 6} among which 3 are nonsquares {2, 3, 6} therefore 2 + 3 + 6 = 11.
		

Crossrefs

Programs

  • Mathematica
    Table[DivisorSum[n, # &, Mod[DivisorSigma[0, #], 2] == 0 &], {n, 1, 75}]
    nmax = 75; Rest[CoefficientList[Series[Sum[(k + Floor[1/2 + Sqrt[k]]) x^(k + Floor[1/2 + Sqrt[k]])/(1 - x^(k + Floor[1/2 + Sqrt[k]])), {k, 1, nmax}], {x, 0, nmax}], x]]
    Array[DivisorSum[#, # &, ! IntegerQ@ Sqrt@ # &] &, 75] (* Michael De Vlieger, Nov 23 2017 *)
  • PARI
    a(n) = sumdiv(n, d, if (!issquare(d), d)); \\ Michel Marcus, Apr 17 2017
    
  • Python
    import gmpy
    from sympy import divisors
    def a(n): return sum([d for d in divisors(n) if gmpy.is_square(d)==0]) # Indranil Ghosh, Apr 18 2017

Formula

G.f.: Sum_{k>=1} A000037(k)*x^A000037(k)/(1 - x^A000037(k)).
a(n) = A000203(n) - A035316(n).
a(A005117(n)) = A000203(A005117(n)) - 1.
a(p^(2*k-1)) = a(p^(2*k)) = p*(p^(2*k) - 1)/(p^2 - 1) for p is a prime and k >= 1.

A291208 Number of noncube divisors of n.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, Aug 21 2017

Keywords

Examples

			a(8) = 2 because 8 has 4 divisors {1, 2, 4, 8} among which 2 are noncubes {2, 4}.
		

Crossrefs

Programs

  • Mathematica
    nmax = 105; Rest[CoefficientList[Series[Sum[(x^k - x^k^3)/((1 - x^k) (1 - x^k^3)), {k, 1, nmax}], {x, 0, nmax}], x]]
    f1[p_, e_] := e + 1; f2[p_, e_] := 1 + Floor[e/3]; a[1] = 0; a[n_] := Module[{fct = FactorInteger[n]}, Times @@ f1 @@@ fct - Times @@ f2 @@@ fct]; Array[a, 100] (* Amiram Eldar, Jan 30 2025 *)
  • PARI
    a(n) = sumdiv(n, d, !ispower(d, 3)); \\ Michel Marcus, Aug 21 2017
    
  • Python
    from math import prod
    from sympy import factorint
    def A291208(n):
        f = factorint(n).values()
        return prod(e+1 for e in f)-prod(e//3+1 for e in f) # Chai Wah Wu, Jun 05 2025

Formula

G.f.: Sum_{k>=1} x^A007412(k)/(1 - x^A007412(k)).
G.f.: Sum_{k>=1} (x^k - x^(k^3))/((1 - x^k)*(1 - x^(k^3))).
a(n) = A000005(n) - A061704(n).
From Amiram Eldar, Jan 30 2025: (Start)
Dirichlet g.f.: zeta(s) * (zeta(s) - zeta(3*s)).
Sum_{k=1..n} a(k) ~ n*(log(n) + 2*gamma - zeta(3) - 1), where gamma is Euler's constant (A001620). (End)

A293575 Difference between the number of proper divisors of n and the number of squares dividing n.

Original entry on oeis.org

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

Views

Author

Juri-Stepan Gerasimov, Oct 14 2017

Keywords

Comments

The difference between the number of ways of writing n = m + k and the number of ways of writing n = r*s, where m|k and r|s.
First occurrence of k beginning with k=-1: 1, 2, 8, 6, 12, 36, 24, 30, 72, 96, 60, 2097152, 216, 576, 120, 210, 1152, 240, 864, etc. - Robert G. Wilson v, Nov 28 2017

Examples

			a(6) = 2 because 2 is difference of number of ways of writing n = 1 + 5 = 2 + 4 = 3 + 3 where 1|5, 2|4, 3|3 and number of ways of writing n = 1*6 where 1|6.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Block[{d = Divisors@ n}, Length@ d - Length[ Select[ d, IntegerQ@ Sqrt@# &]] - 1];; Array[f, 105] (* Robert G. Wilson v, Nov 28 2017 *)

Formula

a(n) = A032741(n) - A046951(n).
a(n) = A056595(n) - 1. - Antti Karttunen, Oct 30 2017
a(n) = 0 iff n is a prime or a square of a prime, A000430. - Robert G. Wilson v, Nov 28 2017
Sum_{k=1..n} a(k) ~ n*log(n) + (2*gamma - zeta(2) - 2)*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Dec 01 2023

A345320 Sum of the divisors of n whose square does not divide n.

Original entry on oeis.org

0, 2, 3, 4, 5, 11, 7, 12, 9, 17, 11, 25, 13, 23, 23, 24, 17, 35, 19, 39, 31, 35, 23, 57, 25, 41, 36, 53, 29, 71, 31, 56, 47, 53, 47, 79, 37, 59, 55, 87, 41, 95, 43, 81, 74, 71, 47, 117, 49, 87, 71, 95, 53, 116, 71, 117, 79, 89, 59, 165, 61, 95, 100, 112, 83, 143, 67, 123, 95, 143, 71, 183, 73, 113, 118, 137, 95, 167, 79, 179, 108, 125, 83
Offset: 1

Views

Author

Wesley Ivan Hurt, Jun 13 2021

Keywords

Comments

Inverse Möbius transform of n+n^(1/2)*((-1)^tau(n)-1)/2. - Wesley Ivan Hurt, Jul 07 2025

Examples

			a(16) = 24; The divisors of 16 whose square does not divide 16 are 8 and 16. The sum of the divisors is then 8 + 16 = 24.
		

Crossrefs

Cf. A000005 (tau), A000203 (sigma), A056595, A069290.

Programs

  • Mathematica
    Table[Sum[k (Ceiling[n/k^2] - Floor[n/k^2]) (1 - Ceiling[n/k] + Floor[n/k]), {k, n}], {n, 80}]
    sdnd[n_]:=Total[Select[Divisors[n],Mod[n,#^2]!=0&]]; Array[sdnd,100] (* Harvey P. Dale, Jul 07 2025 *)
  • PARI
    a(n) = sumdiv(n, d, if (n % d^2, d)); \\ Michel Marcus, Jun 13 2021
    
  • Python
    from math import prod
    from sympy import factorint
    def A345320(n):
        f = factorint(n).items()
        return (prod(p**(q+1)-1 for p, q in f) - prod(p**(q//2+1)-1 for p, q in f))//prod(p-1 for p, q in f) # Chai Wah Wu, Jun 14 2021

Formula

a(n) = Sum_{k=1..n} k * (ceiling(n/k^2) - floor(n/k^2)) * (1 - ceiling(n/k) + floor(n/k)).
a(n) = A000203(n) - A069290(n). - Rémy Sigrist, Jun 14 2021
a(n) = Sum_{d|n} (d+d^(1/2)*((-1)^tau(d)-1)/2). - Wesley Ivan Hurt, Jul 07 2025

A349330 a(n) = Sum_{d|n} d^c(d), where c is the characteristic function of squares (A010052).

Original entry on oeis.org

1, 2, 2, 6, 2, 4, 2, 7, 11, 4, 2, 9, 2, 4, 4, 23, 2, 14, 2, 9, 4, 4, 2, 11, 27, 4, 12, 9, 2, 8, 2, 24, 4, 4, 4, 55, 2, 4, 4, 11, 2, 8, 2, 9, 14, 4, 2, 28, 51, 30, 4, 9, 2, 16, 4, 11, 4, 4, 2, 15, 2, 4, 14, 88, 4, 8, 2, 9, 4, 8, 2, 58, 2, 4, 30, 9, 4, 8, 2, 28, 93, 4, 2, 15, 4, 4, 4
Offset: 1

Views

Author

Wesley Ivan Hurt, Nov 15 2021

Keywords

Comments

For each divisor d of n, add d if d is a square, otherwise add 1 [see example].
Inverse Möbius transform of n^c(n), where c = A010052. - Wesley Ivan Hurt, Mar 31 2025

Examples

			The divisors of 12 are 1, 2, 3, 4, 6, and 12 with squares 1 and 4, so a(12) = 1 + 1 + 1 + 4 + 1 + 1 = 9 (respectively).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := DivisorSum[n, If[IntegerQ @ Sqrt[#], #, 1] &]; Array[a, 100] (* Amiram Eldar, Nov 15 2021 *)
  • PARI
    a(n) = sumdiv(n, d, if (issquare(d), d, 1)); \\ Michel Marcus, Nov 15 2021
    
  • PARI
    a(n) = {my(f = factor(n), cf = f, res); cf[,2]\=2; res = numdiv(f)-prod(i = 1, #f~, cf[i, 2]+1); res+=prod(i = 1, #f~, ((f[i,1]^(2*(cf[i,2]+1))-1)/(f[i,1]^2-1))); res } \\ David A. Corneth, Nov 16 2021

Formula

a(p) = 2 iff p is prime. - Wesley Ivan Hurt, Nov 28 2021
a(n) = A035316(n) + A056595(n). - R. J. Mathar, Aug 18 2024

A345446 Number of semiprime divisors of n whose square does not divide n.

Original entry on oeis.org

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

Views

Author

Wesley Ivan Hurt, Jun 19 2021

Keywords

Comments

a(p) = 0 for p prime.

Crossrefs

Programs

Formula

a(n) = Sum_{d|n} [Omega(d) = 2] * (ceiling(n/d^2) - floor(n/d^2)), where [ ] is the Iverson bracket.

A361634 Integers whose number of square divisors is coprime to the number of their nonsquare divisors.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 9, 10, 11, 13, 14, 15, 16, 17, 19, 21, 22, 23, 25, 26, 29, 30, 31, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 46, 47, 48, 49, 51, 53, 55, 57, 58, 59, 61, 62, 64, 65, 66, 67, 69, 70, 71, 73, 74, 77, 78, 79, 80, 81, 82, 83, 85, 86, 87, 89, 91, 93, 94
Offset: 1

Views

Author

Waldemar Puszkarz, Mar 19 2023

Keywords

Comments

Appears to be a supersequence of A210490, and so also of positive squares and squarefree numbers (A005117). The first term that belongs in here but not in A210490 is 48. The nonsquarefree terms that are not squares are of the form p^(4k)*a, where a is a squarefree number, p is prime, and k > 0. About half of perfect numbers are of this form; one example is 496 = 2^4*31. The sequence has an asymptotic density of about 0.6420.

Examples

			48 has 3 square divisors (1, 4, and 16) and 7 nonsquare ones. Consequently, gcd(3,7)=1, thus 48 is a term.
		

Crossrefs

Cf. A210490, A005117 (subsequences), A046951 (number of square divisors), A056595 (number of nonsquare divisors).

Programs

  • Mathematica
    Select[Range[100],CoprimeQ[Total@(Boole/@IntegerQ/@Sqrt/@Divisors[#]),DivisorSigma[0,#]-Total@(Boole/@IntegerQ/@Sqrt/@Divisors[#])]&]
  • PARI
    for(n=1, 100, a=divisors(n); c=0; for(i=1, #a, issquare(a[i])&&c++); gcd(#a-c, c)==1&&print1(n, ", "))
    
  • PARI
    isok(n) = gcd(numdiv(n), numdiv(sqrtint(n/core(n))))==1 \\ Andrew Howroyd, Mar 19 2023
Previous Showing 11-20 of 20 results.