login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Primes of the form (1 + x)^y + (-x)^y where y is a divisor of x.
4

%I #28 Dec 23 2024 14:53:45

%S 13,37,41,127,271,313,421,881,1013,1201,1801,1861,2113,2269,2381,2791,

%T 3613,4651,5101,5419,6211,7057,7321,9941,10513,10657,12097,13267,

%U 13613,14281,16381,19927,20201,21013,21841,24421,24571,26227,30013,33391,34061,35317,41761,45757,47741,49297

%N Primes of the form (1 + x)^y + (-x)^y where y is a divisor of x.

%C If x = y then: 13, 37, 881, 4651, 1273609, ...

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

%H J. S. Gerasimov, <a href="https://web.archive.org/web/*/http://list.seqfan.eu/oldermail/seqfan/2014-August/013480.html">x^(y + 1) - y^x</a>, SeqFan list, Aug 18 2014.

%e 13 is in this sequence because (1 + 2)^2 + (-2)^2 = 13 is prime where 2 is divisor of 2.

%p N:= 100000: # To get terms <= N

%p Res:= NULL:

%p for y from 2 while 2^y -1 <= N do

%p z:= y/2^padic:-ordp(y, 2);

%p if z > 1 and (z <> y or not isprime(z)) then next fi;

%p for x from y by y do

%p v:= (1+x)^y + (-x)^y;

%p if v > N then break fi;

%p if isprime(v) then Res:= Res, v; fi

%p od od:

%p sort(convert({Res}, list)); # _Robert Israel_, Jan 05 2020

%t Union@ Flatten@ Table[Select[Map[(1 + n)^# + (-n)^# &, Divisors@ n], PrimeQ], {n, 200}] (* _Michael De Vlieger_, Apr 29 2017 *)

%Y Cf. A285886, A285888.

%K nonn,changed

%O 1,1

%A _Juri-Stepan Gerasimov_, Apr 27 2017

%E Edited by _N. J. A. Sloane_, Jan 11 2020