login
The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 

Logo

Thanks to everyone who made a donation during our annual appeal!
To see the list of donors, or make a donation, see the OEIS Foundation home page.

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A056671 1 + the number of unitary and squarefree divisors of n = number of divisors of reduced squarefree part of n. 5
1, 2, 2, 1, 2, 4, 2, 1, 1, 4, 2, 2, 2, 4, 4, 1, 2, 2, 2, 2, 4, 4, 2, 2, 1, 4, 1, 2, 2, 8, 2, 1, 4, 4, 4, 1, 2, 4, 4, 2, 2, 8, 2, 2, 2, 4, 2, 2, 1, 2, 4, 2, 2, 2, 4, 2, 4, 4, 2, 4, 2, 4, 2, 1, 4, 8, 2, 2, 4, 8, 2, 1, 2, 4, 2, 2, 4, 8, 2, 2, 1, 4, 2, 4, 4, 4, 4, 2, 2, 4, 4, 2, 4, 4, 4, 2, 2, 2, 2, 1, 2, 8, 2, 2, 8 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

Note that 1 is regarded as free of squares of primes and is also a square number and a unitary divisor.

LINKS

Antti Karttunen, Table of n, a(n) for n = 1..10000

Steven R. Finch, Unitarism and Infinitarism, February 25, 2004. [Cached copy, with permission of the author]

Index entries for sequences computed from exponents in factorization of n

FORMULA

a(n) = A000005(A055231(n)) = A000005(A007913(n)/A055229(n)).

Multiplicative with a(p) = 2 and a(p^e) = 1 for e > 1. a(n) = 2^A056169(n). - Vladeta Jovovic, Nov 01 2001

a(n) = A034444(n) - A056674(n). - Antti Karttunen, Jul 19 2017

EXAMPLE

n = 252 = 2*2*3*3*7 has 18 divisors, 8 unitary and 8 squarefree divisors of which 2 are unitary and squarefree, divisors {1,7};

n = 2520 = 2*2*2*3*3*5*7 has 48 divisors, 16 unitary and 16 squarefree divisors of which {1,5,7,35} are both, thus a(2520) = 4.

a(2520) = a(2^3*3^2*5*7) = a(2^3)*a(3^2)*a(5)*a(7) = 1*1*2*2 = 4.

MATHEMATICA

Array[DivisorSigma[0, #] &@ Denominator[#/Apply[Times, FactorInteger[#][[All, 1]]]^2] &, 105] (* or *)

Table[DivisorSum[n, 1 &, And[SquareFreeQ@ #, CoprimeQ[#, n/#]] &], {n, 105}] (* Michael De Vlieger, Jul 19 2017 *)

f[p_, e_] := If[e==1, 2, 1]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, May 14 2019 *)

PROG

(PARI)

A057521(n) = { my(f=factor(n)); prod(i=1, #f~, if(f[i, 2]>1, f[i, 1]^f[i, 2], 1)); } \\ Charles R Greathouse IV, Aug 13 2013

A055231(n) = n/A057521(n);

A056671(n) = numdiv(A055231(n));

\\ Or:

A055229(n) = { my(c=core(n)); gcd(c, n/c); }; \\ This function from Charles R Greathouse IV, Nov 20 2012

A056671(n) = numdiv(core(n)/A055229(n)); \\ Antti Karttunen, Jul 19 2017

(Scheme) (define (A056671 n) (if (= 1 n) n (* (if (= 1 (A067029 n)) 2 1) (A056671 (A028234 n))))) ;; (After the given multiplicative formula) - Antti Karttunen, Jul 19 2017

(Python)

from sympy import factorint

from operator import mul

def a(n): return 1 if n==1 else reduce(mul, [2 if e==1 else 1 for p, e in factorint(n).items()])

print map(a, range(1, 101)) # Indranil Ghosh, Jul 19 2017

CROSSREFS

Cf. A000005, A007913, A034444, A055229, A055231, A056169, A056674.

Sequence in context: A304649 A228441 A156260 * A278763 A278762 A055076

Adjacent sequences:  A056668 A056669 A056670 * A056672 A056673 A056674

KEYWORD

mult,nonn

AUTHOR

Labos Elemer, Aug 10 2000

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified January 21 16:54 EST 2020. Contains 331114 sequences. (Running on oeis4.)