cp's OEIS Frontend

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.

A231734 Least k such that n*k^2 - 1 is a prime, or 0 if no such k exists.

This page as a plain text file.
%I A231734 #8 Aug 20 2019 02:51:16
%S A231734 2,2,1,1,2,1,6,1,0,3,2,1,6,1,2,0,2,1,6,1,2,3,4,1,0,2,2,3,4,1,12,1,2,6,
%T A231734 2,0,18,1,14,3,2,1,18,1,2,27,4,1,0,2,10,3,2,1,6,2,2,3,20,1,12,1,2,0,4,
%U A231734 2,6,1,4,9,2,1,30,1,6,3,2,2,6,1,0,12,2,1,12,3,2
%N A231734 Least k such that n*k^2 - 1 is a prime, or 0 if no such k exists.
%H A231734 Michel Marcus, <a href="/A231734/b231734.txt">Table of n, a(n) for n = 1..10000</a>
%e A231734 a(9)=0 because 9*k^2-1 is never a prime: (3k-1)*(3k+1).
%o A231734 (PARI) a(n) = if (issquare(n) && (n>=9), 0, my(k=1); while (!isprime(n*k^2 - 1), k++); k); \\ _Michel Marcus_, Aug 20 2019
%Y A231734 Cf. A000040, A193807.
%K A231734 nonn
%O A231734 1,1
%A A231734 _Alex Ratushnyak_, Nov 12 2013