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!)
A240232 a(n) is the smallest positive integer such that prime(n) + a(n) and prime(n) + a(n)^2 are both prime numbers. 2

%I #18 Aug 10 2017 10:36:13

%S 1,2,6,4,6,4,6,12,6,12,6,4,30,4,6,6,42,6,4,30,6,10,24,12,4,6,6,24,18,

%T 36,10,6,12,10,30,30,6,4,12,54,18,10,6,6,30,28,16,4,6,12,6,12,66,30,6,

%U 18,78,6,4,30,10,18,24,6,36,30,6,16,6,10,6,30,34,6

%N a(n) is the smallest positive integer such that prime(n) + a(n) and prime(n) + a(n)^2 are both prime numbers.

%C Conjecture: For each prime(n) there exists at least one positive integer a(n) such that prime(n) + a(n) and prime(n) + (a(n))^2 are both primes.

%C Alternative representation of this conjecture: If defining a(n)=0 for those n such that no positive integer a(n) exists to make both prime(n)+a(n) and prime(n) + (a(n))^2 primes, it is conjectured that a(n) > 0 for all n >= 1.

%H Lei Zhou, <a href="/A240232/b240232.txt">Table of n, a(n) for n = 1..10000</a>

%e n=1, the first prime number is 2. 3-2=1, 2+1^2=3 is a prime number. So a(1)=1;

%e n=2, the second prime number is 3. 5-3=2, 3+2^2=7 is a prime number. So a(2)=2;

%e n=3, the third prime number is 5. 7-5=2, 5+2^2=9 is not prime number. 11-5=6, 5+6^2=41 is a prime number. So a(3)=6;

%e ...

%e n=13, the 13th prime is 41, 41+30=71, 41+30^2=941 are both prime numbers. For any number smaller than 30, there is not such a feature. So a(13)=30.

%t Table[p = Prime[n]; pt = p; While[pt = NextPrime[pt]; diff = pt - p; ! (PrimeQ[p + diff^2])]; diff, {n, 1, 74}]

%t spi[n_]:=Module[{k=1,pn=Prime[n]},While[!PrimeQ[pn+k]||!PrimeQ[pn+k^2],k++];k]; Array[spi,80] (* _Harvey P. Dale_, Aug 10 2017 *)

%Y Cf. A000040, A240087.

%K nonn,easy

%O 1,2

%A _Lei Zhou_, Apr 02 2014

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 16 03:28 EDT 2024. Contains 371696 sequences. (Running on oeis4.)