Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #11 Nov 13 2024 16:41:08
%S 3,2,6,66,300,24,3744,27000,6,1080,960,90,30,366,9204,8154,1170,840,
%T 330,6090,84,27720,324,90,186,4740,2856,6,24270,936,5220,1560,6,1500,
%U 510,120,930,3270,30,8520,29700,1200,23310,1056,3540,90,3420,2370,9654,83040,2610,9270,2610
%N a(n) is the smallest k such that the following are four primes: prime(n)*k-1, prime(n)*k+1, prime(n)*k^2-1, prime(n)*k^2+1. Or -1 if no such k exists.
%C Conjecture: a(n)>1.
%e a(1)=3 because the following are four primes: 2*3-1, 2*3+1, 2*9-1, 2*9+1.
%o (Python)
%o from sympy import isprime
%o TOP=10**9
%o for p in range(2, 333):
%o if isprime(p):
%o failed = True
%o for x in range(1, TOP):
%o if isprime(p*x+1) and isprime(p*x-1) and isprime(p*x*x-1) and isprime(p*x*x+1):
%o print(x, end=', ')
%o failed = False
%o break
%o if failed: print(-1, end=', ')
%o (PARI) a(n) = {k = 1; p = prime(n); while (! (isprime(p*k-1) && isprime(p*k+1) && isprime(p*k^2-1) && isprime(p*k^2+1)), k++);k;} \\ _Michel Marcus_, Dec 27 2015
%Y Cf. A000040, A035096.
%K nonn
%O 1,1
%A _Alex Ratushnyak_, Dec 25 2015