login
A375775
For n >= 1, a(n) is the largest k >= 1 such that A001359(n) + i*(i + 1) is prime for all i from 1 to k.
1
1, 3, 9, 15, 1, 39, 1, 1, 3, 2, 1, 1, 1, 2, 1, 3, 1, 1, 1, 2, 4, 1, 1, 2, 1, 1, 1, 1, 4, 1, 1, 2, 1, 2, 2, 1, 1, 1, 1, 3, 1, 1, 6, 1, 2, 1, 4, 1, 3, 3, 5, 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 1, 2, 4, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1
OFFSET
1,2
COMMENTS
Record values of k for n = 1,2,3,4,6, i.e., for primes 3,5,11,17,41. What is the next record value of k if it exists ?
From Robert Israel, Sep 27 2024: (Start)
Dickson's conjecture implies that the sequence should be unbounded. However, terms > 39 are expected to be extremely rare. For 7 <= n <= 3*10^6 the only term > 9 is a(740969) = 10. (End)
LINKS
EXAMPLE
n = 1: A001359(1) = 3, 3 + 2 = 5, 3 + 6 is not a prime, thus k = 1.
n = 2: A001359(2) = 5, 5 + 2 = 7, 5 + 6 = 11, 5 + 12 = 17, 5 + 20 is not a prime, thus k = 3.
MAPLE
Primes:= select(isprime, {seq(i, i=3..4000, 2)}):
Twins:= Primes intersect map(`-`, Primes, 2):
f:= proc(n) local i;
for i from 1 do if not isprime(n+i*(i+1)) then return i-1 fi od
end proc:
map(f, Twins); # Robert Israel, Sep 27 2024
MATHEMATICA
s[n_] := If[PrimeQ[n] && PrimeQ[n + 2], Module[{i = 1}, While[PrimeQ[n + i*(i + 1)], i++]; i - 1], Nothing]; Array[s, 3500] (* Amiram Eldar, Aug 27 2024 *)
PROG
(PARI) \\ uses A001359 PARI code
a(n) = my(p=A001359(n)); for (k=1, oo, for (i=1, k, if (!isprime(p+i*(i + 1)), return(k-1)))); \\ Michel Marcus, Aug 27 2024
(PARI) f(p) = for (k=1, oo, for (i=1, k, if (!isprime(p+i*(i + 1)), return(k-1))));
lista(nn) = my(v = select(x->isprime(x+2), primes(nn))); apply(f, v); \\ Michel Marcus, Aug 27 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Ctibor O. Zizka, Aug 27 2024
STATUS
approved