login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A069933 Number of k, 1<=k<=n, such that core(k) divides n, where core(x) is the squarefree part of x, the smallest integer such that x*core(x) is a square. 1
1, 2, 2, 3, 3, 5, 3, 4, 4, 7, 4, 8, 4, 7, 7, 6, 5, 10, 5, 10, 8, 9, 5, 11, 7, 10, 8, 11, 6, 18, 6, 9, 10, 11, 10, 15, 7, 12, 11, 14, 7, 20, 7, 13, 13, 12, 7, 16, 9, 17, 13, 15, 8, 19, 13, 16, 13, 14, 8, 27, 8, 14, 15, 13, 14, 25, 9, 16, 14, 25, 9, 21, 9, 16, 18, 17, 14, 27, 9, 20, 14, 17 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,2
COMMENTS
Sequence does not give the number of all integers of the form core(k) dividing n since this set is infinite (for any square x^2 core(x^2)=1 divides n).
LINKS
FORMULA
a(n) = Sum_{1<=k<=n,(n,k)=1} (-1)^bigomega(k)*floor(n/k). - Benoit Cloitre, May 07 2016
MATHEMATICA
core[n_] := core[n] = Block[{t = Transpose@ FactorInteger@n}, Times @@ (t[[1]]^Mod[t[[2]], 2])]; a[n_] := Length@ Select[Range@n, Mod[n, core@#] == 0 &]; Array[a, 1000] (* Giovanni Resta, May 07 2016 *)
PROG
(PARI) a(n)=sum(i=1, n, if(n%core(i), 0, 1)) \\ Benoit Cloitre, May 07 2016
(PARI) a(n)=sum(k=1, n, if(gcd(n, k)-1, 0, (-1)^bigomega(k)*(n\k))) \\ Benoit Cloitre, May 07 2016
(Sage)
a = sloane.A001222
[sum([n//k*(-1)^a(k) for k in (1..n) if gcd(k, n) == 1]) for n in (1..82)] # Peter Luschny, May 08 2016
CROSSREFS
Cf. A007913.
Sequence in context: A169897 A254309 A079375 * A204987 A102347 A230846
KEYWORD
easy,nonn
AUTHOR
Benoit Cloitre, May 05 2002
STATUS
approved

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

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 07:53 EDT 2024. Contains 371964 sequences. (Running on oeis4.)