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 A178948 #15 Oct 14 2024 07:07:54 %S A178948 1,1,0,0,-1,0,-1,0,-1,1,-1,0,-1,0,-1,1,-1,0,-1,0,-1,2,-1,0,-1,2,-1,1, %T A178948 -1,0,-1,0,-1,1,-1,1,-1,0,-1,2,-1,0,-1,0,-1,1,-1,0,-1,1,-1,2,-1,0,-1, %U A178948 1,-1,1,-1,0,-1,0,-1,1,-1,1,-1,0,-1,3,-1,0,-1,0,-1,1,-1,1,-1,0,-1,3,-1,0,-1,1,-1,1,-1,0 %N A178948 a(n) = smallest m>=0 such that n*(3^m)-1 is prime, or -1 if no such prime exists. %C A178948 For odd n>=5, a(n)=-1 because then n*3^m is odd, therefore n*3^m-1 even and not prime. - _R. J. Mathar_, Jan 03 2011 %e A178948 a(1) = 1 because 1*(3^1) - 1 = 2 is prime. %e A178948 a(5) = -1 because 5*(3^m) - 1 is even and >=4. %e A178948 a(22) = 2 because 22*(3^2)-1 = 197 is prime. %Y A178948 Cf. A038699, A050921. %K A178948 sign %O A178948 1,22 %A A178948 _Jonathan Vos Post_, Dec 31 2010