login
A120720
Irregular triangle T(n, k) = prime(n+1) + (2*k)^2 if ( prime(n+1) + (2*k)^2 ) is prime, for 1 <= k <= n+1, n >= 1, flattened.
1
7, 19, 41, 11, 23, 43, 71, 47, 17, 29, 113, 157, 53, 23, 83, 163, 59, 167, 347, 173, 353, 47, 67, 131, 227, 431, 41, 53, 73, 101, 137, 181, 233, 293, 521, 613, 617, 47, 59, 79, 107, 239, 367, 443, 619, 719, 827, 83, 191, 947, 89, 197, 953, 383, 97, 257, 317, 461, 1217, 71
OFFSET
1,1
LINKS
FORMULA
T(n, k) = prime(n+1) + (2*k)^2 if ( prime(n+1) + (2*k)^2 ) is prime, for 1 <= k <= n+1, n >= 1.
EXAMPLE
Triangle formed from prime(n+1) + (2*k)^2:
7, 19;
9, 21, 41;
11, 23, 43, 71;
15, 27, 47, 75, 111;
17, 29, 49, 77, 113, 157;
21, 33, 53, 81, 117, 161, 213;
23, 35, 55, 83, 119, 163, 215, 275;
27, 39, 59, 87, 123, 167, 219, 279, 347;
keeping only the prime values gives T(n,k):
7, 19;
41;
11, 23, 43, 71;
47;
17, 29, 113, 157;
53;
23, 83, 163;
59, 167, 347;
MATHEMATICA
T[n_, k_]:= If[PrimeQ[(2*k)^2 + Prime[n+1]], (2*k)^2 + Prime[n+1], {}];
Table[T[n, k], {n, 15}, {k, n+1}]//Flatten
PROG
(Magma) [NthPrime(n+1) + 4*k^2: k in [1..n+1], n in [1..21] | IsPrime(NthPrime(n+1) + 4*k^2) ]; // G. C. Greubel, Jul 20 2023
(SageMath)
def A120720(n, k): return nth_prime(n+1) + 4*k^2 if is_prime(nth_prime(n+1) + 4*k^2) else []
flatten([[A120720(n, k) for k in range(1, n+2)] for n in range(1, 22)]) # G. C. Greubel, Jul 20 2023
CROSSREFS
Sequence in context: A303855 A295077 A239359 * A098422 A191066 A087762
KEYWORD
nonn,tabf
AUTHOR
Roger L. Bagula, Aug 15 2006
EXTENSIONS
Edited by G. C. Greubel, Jul 20 2023
STATUS
approved