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.

This page as a plain text file.
%I A225104 #19 Aug 03 2014 14:01:42
%S A225104 370,650,2210,3770,5330,6290,7202,10370,10730,11570,12410,12818,13130,
%T A225104 14690,15170,15650,16250,16490,18122,18530,19370,19610,21170,22490,
%U A225104 24050,24650,25010,26690,28730,29930,30290,30770,31610,32810,33410,34970,36482,36490
%N A225104 Numbers that can be represented as a sum of two distinct nontrivial prime powers in three or more ways.
%C A225104 Indices of terms bigger than 2 in A225099.
%C A225104 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.
%C A225104 It appears that all terms less than 2^34 are even.
%H A225104 Alois P. Heinz, <a href="/A225104/b225104.txt">Table of n, a(n) for n = 1..600</a>
%p A225104 isA025475not1 := proc(n)
%p A225104     if n <= 1 then
%p A225104         false;
%p A225104     elif isprime(n) then
%p A225104         false;
%p A225104     elif nops(numtheory[factorset](n)) = 1 then
%p A225104         true;
%p A225104     else
%p A225104         false;
%p A225104     end if;
%p A225104 end proc:
%p A225104 A025475not1 := proc(n)
%p A225104     option remember;
%p A225104     local a;
%p A225104     if n = 1 then
%p A225104         4;
%p A225104     else
%p A225104         for a from procname(n-1)+1 do
%p A225104             if isA025475not1(a) then
%p A225104                 return a;
%p A225104             end if;
%p A225104         end do:
%p A225104     end if;
%p A225104 end proc:
%p A225104 A225104w := proc(n)
%p A225104     local a,i,ppi,ppj ;
%p A225104     a := 0 ;
%p A225104     for i from 1 do
%p A225104         ppi := A025475not1(i) ;
%p A225104         if ppi >= n/2 then
%p A225104             break;
%p A225104         end if;
%p A225104         ppj := n-ppi ;
%p A225104         if isA025475not1(ppj) then
%p A225104             a := a+1 ;
%p A225104         end if;
%p A225104     end do:
%p A225104     a ;
%p A225104 end proc:
%p A225104 for n from 1 do
%p A225104     if A225104w(n) >= 3 then
%p A225104         print(n) ;
%p A225104     end if;
%p A225104 end do: # _R. J. Mathar_, Jun 13 2013
%t A225104 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 *)
%Y A225104 Cf. A025475, A225099, A225102, A225103.
%K A225104 nonn
%O A225104 1,1
%A A225104 _Alex Ratushnyak_, Apr 28 2013