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.

Original entry on oeis.org

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, 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, 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
Offset: 1

Views

Author

Omar E. Pol, Jun 19 2014

Keywords

Comments

For more information about the quarter-squares see A002620.

Examples

			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.
		

Crossrefs

Programs

  • Haskell
    a239930 = sum . map a240025 . a027750_row
    -- Reinhard Zumkeller, Jul 05 2014
    
  • Maple
    isA002620 := proc(n)
        local k,qsq ;
        for k from 0 do
            qsq := floor(k^2/4) ;
            if n = qsq then
                return true;
            elif qsq > n then
                return false;
            end if;
        end do:
    end proc:
    A239930 := proc(n)
        local a,d ;
        a :=0 ;
        for d in numtheory[divisors](n) do
            if isA002620(d) then
                a:= a+1 ;
            end if;
        end do:
        a;
    end proc: # R. J. Mathar, Jul 03 2014
  • Mathematica
    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 *)
  • PARI
    a(n) = sumdiv(n, d, issquare(d) + issquare(4*d + 1)); \\ Amiram Eldar, Dec 31 2023

Formula

a(n) = Sum_{k=1..A000005(n)} A240025(A027750(n,k)). - Reinhard Zumkeller, Jul 05 2014
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