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

A046951 a(n) is the number of squares dividing n.

Original entry on oeis.org

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

Views

Author

Simon Colton (simonco(AT)cs.york.ac.uk)

Keywords

Comments

Rediscovered by the HR automatic theory formation program.
a(n) depends only on prime signature of n (cf. A025487, A046523). So a(24) = a(375) since 24 = 2^3*3 and 375 = 3*5^3 both have prime signature (3, 1).
First differences of A013936. Average value tends towards Pi^2/6 = 1.644934... (A013661, A013679). - Henry Bottomley, Aug 16 2001
We have a(n) = A159631(n) for all n < 125, but a(125) = 2 < 3 = A159631(125). - Steven Finch, Apr 22 2009
Number of 2-generated Abelian groups of order n, if n > 1. - Álvar Ibeas, Dec 22 2014 [In other words, number of order-n abelian groups with rank <= 2. Proof: let b(n) be such number. A finite abelian group is the inner direct product of all Sylow-p subgroups, so {b(n)} is multiplicative. Obviously b(p^e) = floor(e/2)+1 (corresponding to the groups C_(p^r) X C_(p^(e-r)) for 0 <= r <= floor(e/2)), hence b(n) = a(n) for all n. - Jianing Song, Nov 05 2022]
Number of ways of writing n = r*s such that r|s. - Eric M. Schmidt, Jan 08 2015
The number of divisors of the square root of the largest square dividing n. - Amiram Eldar, Jul 07 2020
The number of unordered factorizations of n into cubefree powers of primes (1, primes and squares of primes, A166684). - Amiram Eldar, Jun 12 2025

Examples

			a(16) = 3 because the squares 1, 4, and 16 divide 16.
G.f. = x + x^2 + x^3 + 2*x^4 + x^5 + x^6 + x^7 + 2*x^8 + 2*x^9 + x^10 + ...
		

Crossrefs

One more than A071325.
Differs from A096309 for the first time at n=32, where a(32) = 3, while A096309(32) = 2 (and also A185102(32) = 2).
Sum of the k-th powers of the square divisors of n for k=0..10: this sequence (k=0), A035316 (k=1), A351307 (k=2), A351308 (k=3), A351309 (k=4), A351310 (k=5), A351311 (k=6), A351313 (k=7), A351314 (k=8), A351315 (k=9), A351315 (k=10).
Sequences of the form n^k * Sum_{d^2|n} 1/d^k for k = 0..10: this sequence (k=0), A340774 (k=1), A351600 (k=2), A351601 (k=3), A351602 (k=4), A351603 (k=5), A351604 (k=6), A351605 (k=7), A351606 (k=8), A351607 (k=9), A351608 (k=10).
Cf. A082293 (a(n)==2), A082294 (a(n)==3).

Programs

  • Haskell
    a046951 = sum . map a010052 . a027750_row
    -- Reinhard Zumkeller, Dec 16 2013
    
  • Magma
    [#[d: d in Divisors(n)|IsSquare(d)]:n in [1..120]]; // Marius A. Burtea, Jan 21 2020
    
  • Maple
    A046951 := proc(n)
        local a,s;
        a := 1 ;
        for p in ifactors(n)[2] do
            a := a*(1+floor(op(2,p)/2)) ;
        end do:
        a ;
    end proc: # R. J. Mathar, Sep 17 2012
    # Alternatively:
    isbidivisible := (n, d) -> igcd(n, d) = d and igcd(n/d, d) = d:
    a := n -> nops(select(k -> isbidivisible(n, k), [seq(1..n)])): # Peter Luschny, Jun 13 2025
  • Mathematica
    a[n_] := Length[ Select[ Divisors[n], IntegerQ[Sqrt[#]]& ] ]; Table[a[n], {n, 1, 105}] (* Jean-François Alcover, Jun 26 2012 *)
    Table[Length[Intersection[Divisors[n], Range[10]^2]], {n, 100}] (* Alonso del Arte, Dec 10 2012 *)
    a[ n_] := If[ n < 1, 0, Sum[ Mod[ DivisorSigma[ 0, d], 2], {d, Divisors @ n}]]; (* Michael Somos, Jun 13 2014 *)
    a[ n_] := If[ n < 2, Boole[ n == 1], Times @@ (Quotient[ #[[2]], 2] + 1 & /@ FactorInteger @ n)]; (* Michael Somos, Jun 13 2014 *)
    a[ n_] := If[ n < 0, 0, SeriesCoefficient[ Sum[ x^k^2 / (1 - x^k^2), {k, Sqrt @ n}], {x, 0, n}]]; (* Michael Somos, Jun 13 2014 *)
    f[p_, e_] := 1 + Floor[e/2]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Sep 15 2020 *)
  • PARI
    a(n)=my(f=factor(n));for(i=1,#f[,1],f[i,2]\=2);numdiv(factorback(f)) \\ Charles R Greathouse IV, Dec 11 2012
    
  • PARI
    a(n) = direuler(p=2, n, 1/((1-X^2)*(1-X)))[n]; \\ Michel Marcus, Mar 08 2015
    
  • PARI
    a(n)=factorback(apply(e->e\2+1, factor(n)[,2])) \\ Charles R Greathouse IV, Sep 17 2015
    
  • Python
    from math import prod
    from sympy import factorint
    def A046951(n): return prod((e>>1)+1 for e in factorint(n).values()) # Chai Wah Wu, Aug 04 2024
    
  • Python
    def is_bidivisible(n, d) -> bool: return gcd(n, d) == d and gcd(n//d, d) == d
    def aList(n) -> list[int]: return [k for k in range(1, n+1) if is_bidivisible(n, k)]
    print([len(aList(n)) for n in range(1, 126)])  # Peter Luschny, Jun 13 2025
  • Scheme
    (definec (A046951 n) (if (= 1 n) 1 (* (A008619 (A007814 n)) (A046951 (A064989 n)))))
    (define (A008619 n) (+ 1 (/ (- n (modulo n 2)) 2)))
    ;; Antti Karttunen, Nov 14 2016
    

Formula

a(p^k) = A008619(k) = [k/2] + 1. a(A002110(n)) = 1 for all n. (This is true for any squarefree number, A005117). - Original notes clarified by Antti Karttunen, Nov 14 2016
a(n) = |{(i, j) : i*j = n AND i|j}| = |{(i, j) : i*j^2 = n}|. Also tau(A000188(n)), where tau = A000005.
Multiplicative with p^e --> floor(e/2) + 1, p prime. - Reinhard Zumkeller, May 20 2007
a(A130279(n)) = n and a(m) <> n for m < A130279(n); A008966(n)=0^(a(n) - 1). - Reinhard Zumkeller, May 20 2007
Inverse Moebius transform of characteristic function of squares (A010052). Dirichlet g.f.: zeta(s)*zeta(2s).
G.f.: Sum_{k > 0} x^(k^2)/(1 - x^(k^2)). - Vladeta Jovovic, Dec 13 2002
a(n) = Sum_{k=1..A000005(n)} A010052(A027750(n,k)). - Reinhard Zumkeller, Dec 16 2013
a(n) = Sum_{k = 1..n} ( floor(n/k^2) - floor((n-1)/k^2) ). - Peter Bala, Feb 17 2014
From Antti Karttunen, Nov 14 2016: (Start)
a(1) = 1; for n > 1, a(n) = A008619(A007814(n)) * a(A064989(n)).
a(n) = A278161(A156552(n)). (End)
G.f.: Sum_{k>0}(theta(q^k)-1)/2, where theta(q)=1+2q+2q^4+2q^9+2q^16+... - Mamuka Jibladze, Dec 04 2016
From Antti Karttunen, Nov 12 2017: (Start)
a(n) = A000005(n) - A056595(n).
a(n) = 1 + A071325(n).
a(n) = 1 + A001222(A293515(n)). (End)
L.g.f.: -log(Product_{k>=1} (1 - x^(k^2))^(1/k^2)) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, Jul 30 2018
a(n) = Sum_{d|n} A000005(d) * A008836(n/d). - Torlach Rush, Jan 21 2020
a(n) = A000005(sqrt(A008833(n))). - Amiram Eldar, Jul 07 2020
a(n) = Sum_{d divides n} mu(core(d)^2), where core(n) = A007913(n). - Peter Bala, Jan 24 2024

Extensions

Data section filled up to 125 terms and wrong claim deleted from Crossrefs section by Antti Karttunen, Nov 14 2016

A048111 Number of unitary divisors of n (A034444) < number of non-unitary divisors of n (A048105).

Original entry on oeis.org

16, 32, 36, 48, 64, 72, 80, 81, 96, 100, 108, 112, 128, 144, 160, 162, 176, 180, 192, 196, 200, 208, 216, 224, 225, 240, 243, 252, 256, 272, 288, 300, 304, 320, 324, 336, 352, 360, 368, 384, 392, 396, 400, 405, 416, 432, 441, 448, 450, 464, 468, 480, 484
Offset: 1

Views

Author

Keywords

Comments

Numbers n that are expressible as a product of 2 "nonsquarefree" numbers (i.e., there are 2 integers x,y in A001694 such that n = xy). - Benoit Cloitre, Jan 01 2003
Also numbers having more than one square divisor > 1: A046951(a(n)) > 2. - Reinhard Zumkeller, Apr 08 2003
The asymptotic density of this sequence is 1 - (6/Pi^2)*(1 + Sum_{n>=1} 1/prime(n)^2) = 1 - A059956 * (1 + A085548) = 0.1171394347594477824... . - Amiram Eldar, Sep 25 2022

Examples

			36 is in the sequence since the number of its unitary divisors, {1, 4, 9, 36} is 4 which is smaller than 5, the number of its non-unitary divisors, {2, 3, 6, 12, 18}.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[484], DivisorSigma[0, #] > 2^(PrimeNu[#]+1) &] (* Amiram Eldar, Jun 11 2019 *)
  • PARI
    is(n)=my(f=factor(n)[,2],t); for(i=1,#f,if(f[i]>1, if(t||f[i]>3, return(1), t=1))); 0 \\ Charles R Greathouse IV, Sep 17 2015

Formula

A000005(a(n)) > 2^(1 + A001221(a(n))).

A337534 Nontrivial squares together with nonsquares whose square part's square root is in the sequence.

Original entry on oeis.org

4, 9, 16, 25, 32, 36, 48, 49, 64, 80, 81, 96, 100, 112, 121, 144, 160, 162, 169, 176, 196, 208, 224, 225, 240, 243, 256, 272, 289, 304, 324, 336, 352, 361, 368, 400, 405, 416, 441, 464, 480, 484, 486, 496, 512, 528, 529, 544, 560, 567, 576, 592, 608, 624, 625
Offset: 1

Views

Author

Peter Munn, Aug 31 2020

Keywords

Comments

The appearance of a number is determined by its prime signature.
No terms are squarefree, as the square root of the square part of a squarefree number is 1.
If the square part of k is a 4th power, other than 1, k appears.
Every positive integer k is the product of a unique subset S_k of the terms of A050376, which are arranged in array form in A329050 (primes in column 0, squares of primes in column 1, 4th powers of primes in column 2 and so on). k is in this sequence if and only if there is m >= 1 such that column m of A329050 contains a member of S_k, but column m - 1 does not.

Examples

			4 is square and nontrivial (not 1), so 4 is in the sequence.
12 = 3 * 2^2 is nonsquare, but has square part 4, whose square root (2) is not in the sequence. So 12 is not in the sequence.
32 = 2 * 4^2 is nonsquare, and has square part 16, whose square root (4) is in the sequence. So 32 is in the sequence.
		

Crossrefs

Complement of A337533.
Subsequences: A000290\{0,1}, A082294.
Subsequence of: A013929, A162643.
A209229, A267116 are used in a formula defining this sequence.

Programs

  • Maple
    A337534 := proc(n)
        option remember ;
        if n =1  then
            4;
        else
            for a from procname(n-1)+1 do
                if A209229(A267116(a)+1) = 0 then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    seq(A337534(n),n=1..80) ; # R. J. Mathar, Feb 16 2021
  • Mathematica
    pow2Q[n_] := n == 2^IntegerExponent[n, 2]; Select[Range[625], ! pow2Q[1 + BitOr @@ (FactorInteger[#][[;; , 2]])] &] (* Amiram Eldar, Sep 18 2020 *)

Formula

Numbers k such that A209229(A267116(k) + 1) = 0.
A008833(a(n)) > 1.

A082295 Numbers having more than two square divisors > 1.

Original entry on oeis.org

36, 64, 72, 100, 108, 128, 144, 180, 192, 196, 200, 216, 225, 252, 256, 288, 300, 320, 324, 360, 384, 392, 396, 400, 432, 441, 448, 450, 468, 484, 500, 504, 512, 540, 576, 588, 600, 612, 640, 648, 675, 676, 684, 700, 704, 720, 729, 756, 768, 784, 792, 800
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 08 2003

Keywords

Comments

If n is in the sequence, so is m*n. - Charles R Greathouse IV, Oct 16 2015
The asymptotic density of this sequence is 1 - (6/Pi^2) * (1 + Sum_{p prime} (1/p^2 + 1/(p^3*(p+1)) + 1/(p^4*(p+1)))) = 0.07033321843992718294... . - Amiram Eldar, Sep 25 2022

Examples

			n=200 has 4 square divisors: 1, 4, 25 and 100, therefore 200 is a term.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[1000],Length[Rest[Select[ Divisors[#], IntegerQ[ Sqrt[ #]]&]]]> 2&] (* Harvey P. Dale, Jan 08 2014 *)
  • PARI
    is(n)=my(f=vecsort(factor(n)[,2],,4)); #f && (f[1]>5 || (#f>1 && f[2]>1)) \\ Charles R Greathouse IV, Oct 16 2015

Formula

A046951(a(n)) > 3.
a(n) < 17n for n > 25. - Charles R Greathouse IV, Oct 16 2015
Showing 1-4 of 4 results.