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!)
A243146 a(n) = smallest number k such that n+k, n+k^2 and n+k^4 are all prime, or 0 if no such k exists. 1
1, 1, 2, 1, 6, 1, 4, 3, 10, 1, 6, 1, 4, 165, 2, 1, 252, 1, 210, 3, 16, 1, 6, 35, 4, 15, 2, 1, 2040, 1, 6, 69, 8, 75, 12, 1, 4, 393, 50, 1, 660, 1, 18, 135, 14, 1, 42, 5, 220, 3, 16, 1, 30, 365, 4, 51, 2, 1, 420, 1, 426, 21, 8, 0, 6, 1, 70, 351, 1340, 1, 30, 1, 28, 525, 98, 61 (list; graph; refs; listen; history; text; internal format)
OFFSET
1,3
COMMENTS
a(n) = 0 is definite. a(n) = 0 iff n = 4m^4 for m > 1. If n = 4m^4, 4m^4+k^4 = (2m^2+2mk+k^2)*(2m^2-2mk+k^2), meaning it is never prime. For m = 1, 2*1^2-2*1*k+k^2 = 2-2k+k^2 is 1 for k = 1. This is why a(4) = 1.
If n is in A006093 (a prime minus 1), then a(n) = 1 and the 3 primes of the definition coincide. - Michel Marcus, Jun 01 2014
LINKS
EXAMPLE
3+1, 3+1^2, and 3+1^3 are not prime. 3+2 (5), 3+2^2 (9), and 3+2^3 (11) are all prime. Thus a(3) = 2.
MATHEMATICA
f[n_] := If[n == 4 || !IntegerQ[(n/4)^(1/4)], Block[{k = 1}, While[ !PrimeQ[n + k] || !PrimeQ[n + k^2] || !PrimeQ[n + k^4], k++]; k], 0]; Array[ f, 70] (* Robert G. Wilson v, Jun 01 2014 *)
PROG
(PARI) a(n)=for(k=1, 10^6, if(ispseudoprime(n+k)&&ispseudoprime(n+k^2)&&ispseudoprime(n+k^4), return(k)))
n=1; while(n<100, print1(a(n), ", "); n+=1)
CROSSREFS
Sequence in context: A189733 A306927 A277791 * A349440 A048671 A335023
KEYWORD
nonn
AUTHOR
Derek Orr, May 30 2014
EXTENSIONS
Definition corrected by N. J. A. Sloane, May 31 2014
STATUS
approved

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 April 24 20:08 EDT 2024. Contains 371963 sequences. (Running on oeis4.)