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.

A214154 Number of ways to represent 2n as the sum of two distinct k-almost primes: #{mA001222(m)=A001222(2n-m)}.

Original entry on oeis.org

0, 0, 0, 1, 2, 1, 2, 3, 3, 4, 2, 5, 4, 4, 6, 5, 4, 8, 4, 8, 7, 6, 5, 12, 8, 7, 8, 8, 7, 15, 6, 13, 9, 7, 11, 18, 9, 11, 14, 14, 8, 18, 12, 12, 19, 11, 12, 21, 9, 18, 14, 16, 13, 21, 16, 19, 16, 17, 13, 34, 12, 15, 22, 20, 15, 23, 14, 17, 17, 22
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Jul 05 2012

Keywords

Comments

Number of ways to represent 2n as the sum of two distinct numbers with the same number of prime divisors (counted with multiplicity).

Examples

			a(10)=4 because 2*10 = 3(1-almost prime) + 17(1-almost prime) = 6(2-almost prime) + 14(2-almost prime) = 7(1-almost prime) + 13(1-almost prime) = 8(3-almost prime) + 12(3-almost prime).
		

Crossrefs

Programs

  • Maple
    iskalmos := proc(n,k)
            numtheory[bigomega](n) = k ;
    end proc:
    sumDistKalmost := proc(n,k)
            a := 0 ;
            for i from 0 to n/2 do
                    if iskalmos(i,k) and iskalmos(n-i,k) and i <> n-i then
                            a := a+1 ;
                    end if;
            end do:
            return a;
    end proc:
    A214154 := proc(n)
            a := 0 ;
            for k from 1 do
                    if 2^k > n then
                            break;
                    end if;
                    a := a+sumDistKalmost(2*n,k) ;
            end do:
            return a;
    end proc: # R. J. Mathar, Jul 05 2012
    A214154 := n->add(`if`(numtheory[bigomega](m)=numtheory[bigomega](2*n-m),1,0), m=2..n-1); # M. F. Hasler, Jul 21 2012
  • PARI
    A214154(n)=sum(m=2,n-1,bigomega(m)==bigomega(2*n-m)) \\ - M. F. Hasler, Jul 21 2012