This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A381532 #71 Mar 29 2025 04:26:29 %S A381532 1,2,2,2,2,2,6,6,4,8,4,6,2,2,10,10,2,6,12,6,4,6,4,2,14,2,2,6,6,2,2,6, %T A381532 6,6,20,6,4,8,4,16,2,2,2,2,8,10,4,2,6,6,6,14,2,4,10,6,2,6,2,6,18,2,2, %U A381532 2,2,12,10,2,6,6,4,2,22,4,6,10,12,6,8,8,12,2 %N A381532 Smallest integer k>0 such that prime(n) + k*prime(n+1) is prime. %e A381532 a(1)= 1, because 2 and 3 are consecutive primes and 2 + 1*3 = 5 is prime, and no lesser number has this property. %e A381532 p + k*q, where p and q are consecutive primes %e A381532 2 + 1* 3 = 5 is prime; %e A381532 3 + 2* 5 = 13 is prime; %e A381532 5 + 2* 7 = 19 is prime; %e A381532 7 + 2*11 = 29 is prime; %t A381532 Do[k=0;Until[PrimeQ[Prime[n]+k*Prime[n+1]],k++];a[n]=k,{n,82}];Array[a,82] (* _James C. McMahon_, Mar 28 2025 *) %o A381532 (PARI) a(n) = my(p=prime(n), q=nextprime(p+1), k=1); while (!isprime(p+k*q), k++); k; \\ _Michel Marcus_, Mar 09 2025 %Y A381532 Cf. A129919 (resulting primes), A175914 (primes for which k=2), A368691 (primes for which k=4). %K A381532 nonn %O A381532 1,2 %A A381532 _Jean-Marc Rebert_, Mar 07 2025