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.

A239930 Number of distinct quarter-squares dividing n.

This page as a plain text file.
%I A239930 #33 Dec 31 2023 06:23:53
%S A239930 1,2,1,3,1,3,1,3,2,2,1,5,1,2,1,4,1,4,1,4,1,2,1,5,2,2,2,3,1,4,1,4,1,2,
%T A239930 1,7,1,2,1,4,1,4,1,3,2,2,1,6,2,3,1,3,1,4,1,4,1,2,1,7,1,2,2,5,1,3,1,3,
%U A239930 1,2,1,8,1,2,2,3,1,3,1,5,3,2,1,6,1,2,1,3,1,6,1,3,1,2,1,6,1,3,2,6,1,3,1,3,1,2,1,7,1,3
%N A239930 Number of distinct quarter-squares dividing n.
%C A239930 For more information about the quarter-squares see A002620.
%H A239930 Reinhard Zumkeller, <a href="/A239930/b239930.txt">Table of n, a(n) for n = 1..10000</a>
%H A239930 Wikipedia, <a href="http://www.wikipedia.org/wiki/Table_of_divisors">Table of divisors</a>.
%F A239930 a(n) = Sum_{k=1..A000005(n)} A240025(A027750(n,k)). - _Reinhard Zumkeller_, Jul 05 2014
%F A239930 Asymptotic mean: Limit_{m->oo} (1/m) * Sum_{k=1..m} a(k) = zeta(2) + 1 = A013661 + 1 = 2.644934... . - _Amiram Eldar_, Dec 31 2023
%e A239930 For n = 12 the quarter-squares <= 12 are [0, 0, 1, 2, 4, 6, 9, 12]. There are five quarter-squares that divide 12; they are [1, 2, 4, 6, 12], so a(12) = 5.
%p A239930 isA002620 := proc(n)
%p A239930     local k,qsq ;
%p A239930     for k from 0 do
%p A239930         qsq := floor(k^2/4) ;
%p A239930         if n = qsq then
%p A239930             return true;
%p A239930         elif qsq > n then
%p A239930             return false;
%p A239930         end if;
%p A239930     end do:
%p A239930 end proc:
%p A239930 A239930 := proc(n)
%p A239930     local a,d ;
%p A239930     a :=0 ;
%p A239930     for d in numtheory[divisors](n) do
%p A239930         if isA002620(d) then
%p A239930             a:= a+1 ;
%p A239930         end if;
%p A239930     end do:
%p A239930     a;
%p A239930 end proc: # _R. J. Mathar_, Jul 03 2014
%t A239930 qsQ[n_] := AnyTrue[Range[Ceiling[2 Sqrt[n]]], n == Floor[#^2/4]&]; a[n_] := DivisorSum[n, Boole[qsQ[#]]&]; Array[a, 110] (* _Jean-François Alcover_, Feb 12 2018 *)
%o A239930 (Haskell)
%o A239930 a239930 = sum . map a240025 . a027750_row
%o A239930 -- _Reinhard Zumkeller_, Jul 05 2014
%o A239930 (PARI) a(n) = sumdiv(n, d, issquare(d) + issquare(4*d + 1)); \\ _Amiram Eldar_, Dec 31 2023
%Y A239930 Cf. A000005, A001221, A001511, A002620, A005086, A006519, A007862, A013661, A027750, A046951, A147645, A236103.
%Y A239930 Cf. A240025.
%K A239930 nonn
%O A239930 1,2
%A A239930 _Omar E. Pol_, Jun 19 2014