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.
%I A206369 #97 Mar 05 2024 15:38:27 %S A206369 1,1,2,3,4,2,6,5,7,4,10,6,12,6,8,11,16,7,18,12,12,10,22,10,21,12,20, %T A206369 18,28,8,30,21,20,16,24,21,36,18,24,20,40,12,42,30,28,22,46,22,43,21, %U A206369 32,36,52,20,40,30,36,28,58,24,60,30,42,43,48,20,66,48,44,24,70,35 %N A206369 a(p^k) = p^k - p^(k-1) + p^(k-2) - ... +- 1, and then extend by multiplicativity. %C A206369 For more information see the Comments in A061020. %C A206369 a(n) is the number of integers j such that 1 <= j <= n and gcd(n,j) is a perfect square. For example, a(12) = 6 because |{1,4,5,7,8,11}|=6 and the respective GCDs with 12 are 1,4,1,1,4,1, which are squares. - _Geoffrey Critzer_, Feb 16 2015 %C A206369 If m is squarefree (A005117), then a(m) = A000010(m) where A000010 is the Euler totient function. - _Michel Marcus_, Nov 08 2017 %C A206369 Also it appears that the primorials (A002110) is the sequence of indices of minimum records for a(n)/n, and these records are A038110(n)/A060753(n). - _Michel Marcus_, Nov 09 2017 %C A206369 Also called rho(n). When rho(n) | n, then n is called k-imperfect, with k = n/rho(n), cf. A127724. - _M. F. Hasler_, Feb 13 2020 %D A206369 P. J. McCarthy, Introduction to Arithmetical Functions, Springer Verlag, 1986, page 25. %H A206369 Reinhard Zumkeller, <a href="/A206369/b206369.txt">Table of n, a(n) for n = 1..10000</a> %H A206369 László Tóth, <a href="http://arxiv.org/abs/1111.4842">A survey of the alternating sum-of-divisors function</a>, arXiv:1111.4842 [math.NT], 2011-2014. %F A206369 a(n) = abs(A061020(n)). %F A206369 a(n) = n*Sum_{d|n} lambda(d)/d, where lambda(n) is A008836(n). - _Enrique Pérez Herrero_, Sep 23 2012 %F A206369 Dirichlet g.f.: zeta(s - 1)*zeta(2*s)/zeta(s). - _Geoffrey Critzer_, Feb 25 2015 %F A206369 From _Michel Marcus_, Nov 05 2017: (Start) %F A206369 a(2^n) = A001045(n+1); %F A206369 a(3^n) = A015518(n+1); %F A206369 a(5^n) = A015531(n+1); %F A206369 a(7^n) = A015552(n+1); %F A206369 a(11^n) = A015592(n+1). (End) %F A206369 a(p^k) = p^k - a(p^(k - 1)) for k > 0 and prime p. - _David A. Corneth_, Nov 09 2017 %F A206369 a(n) = Sum_{d|n, d is a perfect square} phi(n/d), where phi(k) is the Euler totient function. - _Daniel Suteu_, Jun 27 2018 %F A206369 a(p^k) = A071324(p^k), for k >= 0 and prime p. - _Michel Marcus_, Aug 11 2018 %F A206369 Sum_{k=1..n} a(k) ~ Pi^2 * n^2 / 30. - _Vaclav Kotesovec_, Feb 07 2019 %F A206369 G.f.: Sum_{k>=1} lambda(k)*x^k/(1 - x^k)^2. - _Ilya Gutkovskiy_, May 23 2019 %F A206369 a(n) = Sum_{i=1..n} A010052(gcd(n,i)). - _Ridouane Oudra_, Nov 24 2019 %F A206369 a(p^k) = round(p^(k+1)/(p+1)). - _M. F. Hasler_, Feb 13 2020 %p A206369 a:= n-> mul(add(i[1]^(i[2]-j)*(-1)^j, j=0..i[2]), i=ifactors(n)[2]): %p A206369 seq(a(n), n=1..100); # _Alois P. Heinz_, Nov 03 2017 %t A206369 Table[Length[Select[Range[n], IntegerQ[GCD[n, #]^(1/2)] &]], {n, 72}] (* _Geoffrey Critzer_, Feb 16 2015 *) %t A206369 a[n_] := n*DivisorSum[n, LiouvilleLambda[#]/#&]; Array[a, 72] (* _Jean-François Alcover_, Dec 04 2017, after _Enrique Pérez Herrero_ *) %t A206369 f[p_,e_] := Sum[(-1)^(e-k)*p^k, {k,0,e}]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* _Amiram Eldar_, Jan 01 2020 *) %o A206369 (Haskell) %o A206369 a206369 n = product $ %o A206369 zipWith h (a027748_row n) (map toInteger $ a124010_row n) where %o A206369 h p e = sum $ take (fromInteger e + 1) $ %o A206369 iterate ((* p) . negate) (1 - 2 * (e `mod` 2)) %o A206369 -- _Reinhard Zumkeller_, Feb 08 2012 %o A206369 (PARI) a(n) = sum(k=1, n, issquare(gcd(n, k))); %o A206369 (PARI) ak(p,e)=my(s=1); for(i=1,e, s=s*p + (-1)^i); s %o A206369 a(n)=my(f=factor(n)); prod(i=1,#f~, ak(f[i,1],f[i,2])) \\ _Charles R Greathouse IV_, Dec 27 2016 %o A206369 (PARI) a(n) = sumdiv(n, d, eulerphi(n/d) * issquare(d)); \\ _Daniel Suteu_, Jun 27 2018 %o A206369 (PARI) apply( {A206369(n)=vecprod([f[1]^(f[2]+1)\/(f[1]+1)|f<-factor(n)~])}, [1..99]) \\ _M. F. Hasler_, Feb 13 2020 %o A206369 (Python) %o A206369 from math import prod %o A206369 from sympy import factorint %o A206369 def A206369(n): return prod((lambda x:x[0]+int((x[1]<<1)>=p+1))(divmod(p**(e+1),p+1)) for p, e in factorint(n).items()) # _Chai Wah Wu_, Mar 05 2024 %Y A206369 Cf. A061020, A206368. %Y A206369 Cf. A027748 row, A124010, A206475 (first differences). %Y A206369 Cf. A078429. %Y A206369 Cf. A127724 (k-imperfect), A127725 (2-imperfect), A127726 (3-imperfect). %K A206369 nonn,mult %O A206369 1,3 %A A206369 _N. J. A. Sloane_, Feb 06 2012