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.

A225104 Numbers that can be represented as a sum of two distinct nontrivial prime powers in three or more ways.

Original entry on oeis.org

370, 650, 2210, 3770, 5330, 6290, 7202, 10370, 10730, 11570, 12410, 12818, 13130, 14690, 15170, 15650, 16250, 16490, 18122, 18530, 19370, 19610, 21170, 22490, 24050, 24650, 25010, 26690, 28730, 29930, 30290, 30770, 31610, 32810, 33410, 34970, 36482, 36490
Offset: 1

Views

Author

Alex Ratushnyak, Apr 28 2013

Keywords

Comments

Indices of terms bigger than 2 in A225099.
Nontrivial prime powers are numbers of the form p^k where p is a prime number and k >= 2. That is, A025475 except the first term A025475(1) = 1.
It appears that all terms less than 2^34 are even.

Crossrefs

Programs

  • Maple
    isA025475not1 := proc(n)
        if n <= 1 then
            false;
        elif isprime(n) then
            false;
        elif nops(numtheory[factorset](n)) = 1 then
            true;
        else
            false;
        end if;
    end proc:
    A025475not1 := proc(n)
        option remember;
        local a;
        if n = 1 then
            4;
        else
            for a from procname(n-1)+1 do
                if isA025475not1(a) then
                    return a;
                end if;
            end do:
        end if;
    end proc:
    A225104w := proc(n)
        local a,i,ppi,ppj ;
        a := 0 ;
        for i from 1 do
            ppi := A025475not1(i) ;
            if ppi >= n/2 then
                break;
            end if;
            ppj := n-ppi ;
            if isA025475not1(ppj) then
                a := a+1 ;
            end if;
        end do:
        a ;
    end proc:
    for n from 1 do
        if A225104w(n) >= 3 then
            print(n) ;
        end if;
    end do: # R. J. Mathar, Jun 13 2013
  • Mathematica
    nn = 36490; p = Sort[Flatten[Table[Prime[n]^i, {n, PrimePi[Sqrt[nn]]}, {i, 2, Log[Prime[n], nn]}]]]; Transpose[Sort[Select[Tally[Flatten[Table[p[[i]] + p[[j]], {i, Length[p] - 1}, {j, i + 1, Length[p]}]]], #[[1]] <= nn && #[[2]] > 2 &]]][[1]] (* T. D. Noe, Apr 29 2013 *)