login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A318530 Numbers that can be written in more than one way as p^2 + q^3 + r^4 with p, q and r primes. 1

%I #10 Jan 31 2019 03:31:00

%S 145,210,637,754,2317,2530,2917,5218,5437,5890,6447,6997,7469,7653,

%T 7738,8650,9333,11818,12417,12796,14770,15178,15197,15295,15513,16349,

%U 16501,17367,18389,19709

%N Numbers that can be written in more than one way as p^2 + q^3 + r^4 with p, q and r primes.

%H Robert Israel, <a href="/A318530/b318530.txt">Table of n, a(n) for n = 1..10000</a>

%e a(1) = 145 = 2^2 + 5^3 + 2^4 = 11^2 + 2^3 + 2^4 .

%e The first term which can be written in three different ways is

%e 17367 = 23^2 + 13^3 + 11^4 = 113^2 + 13^3 + 7^4 = 131^2 + 5^3 + 3^4 .

%p N:= 10^5: # to get terms <= N

%p P:= select(isprime, [2,seq(i,i=3..floor(sqrt(N)))]):

%p Psq:= map(`^`,P,2):

%p P3:= select(`<=`,map(`^`,P,3),N):

%p P4:= select(`<=`,map(`^`,P,4),N):

%p V:= Vector(N):

%p for a in Psq do for b in P3 do for c in P4 do

%p s:= a+b+c;

%p if s <= N then V[s]:= V[s]+1 fi

%p od od od:

%p select(t -> V[t]>=2, [$1..N]); # _Robert Israel_, Jan 30 2019

%Y Subset of A134657.

%K nonn

%O 1,1

%A _Philippe Guglielmetti_, Aug 28 2018

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified March 28 22:04 EDT 2024. Contains 371254 sequences. (Running on oeis4.)