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.

A172398 Number of partitions of n into the sum of two refactorable numbers (A033950).

Original entry on oeis.org

0, 1, 1, 1, 0, 0, 0, 0, 1, 2, 1, 0, 1, 1, 0, 1, 1, 1, 1, 2, 1, 0, 0, 1, 1, 2, 1, 0, 0, 1, 0, 1, 1, 0, 0, 2, 1, 1, 0, 0, 1, 2, 0, 1, 1, 0, 0, 3, 1, 0, 0, 1, 0, 1, 0, 0, 1, 2, 0, 1, 1, 1, 0, 2, 1, 0, 0
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 20 2010

Keywords

Examples

			a(10)=2 because 10 = 1(refactorable) + 9(refactorable) = 2(refactorable) + 8(refactorable).
		

Crossrefs

Cf. A033950.

Programs

  • Maple
    with(numtheory);
    a:=n-> sum( ((1 + floor(i/tau(i)) - ceil(i/tau(i))) * (1 + floor((n-i)/tau(n-i)) - ceil((n-i)/tau(n-i))) ), i=1..floor(n/2));
    # alternative
    isA033950 := proc(n)
        if modp(n,numtheory[tau](n)) = 0 then
            true;
        else
            false;
        end if;
    end proc:
    A172398 := proc(n)
        local a;
        a := 0 ;
        for i from 1 to n/2 do
            if isA033950(i) and isA033950(n-i) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc: # R. J. Mathar, Jul 21 2015
  • Mathematica
    a[n_] := IntegerPartitions[n, {2}, Select[Range[n], Divisible[#, DivisorSigma[0, #]]&]] // Length;
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Jun 04 2023 *)

Formula

a(n) = Sum_{i=1..floor(n/2)} ((1+floor(i/d(i)) - ceiling(i/d(i))) * (1 + floor((n-i)/d(n-i)) - ceiling((n-i)/d(n-i)))). - Wesley Ivan Hurt, Jan 12 2013

Extensions

Corrected by D. S. McNeil, Nov 20 2010