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.

A378459 a(n) is the least k such that the concatenation of 2^n-1 and 2^k-1 is prime, or -1 if there is no such k.

This page as a plain text file.
%I A378459 #12 Dec 05 2024 10:47:04
%S A378459 1,1,1,1,1,1,3,1,2,13,3,11,5,5,2,1,6,1,3,1,25,5,9,7,6,3,11,3,2,17,2,
%T A378459 99,31,15,3,19,6,9,1,1,5,23,9,1,11,15,5,11,26,9,2,35,17,43,17,61,11,
%U A378459 21,13,139,3,13,25,17,14,1,2,21,19,9,3,5,6,177,41,39,2,73,22,9,31,3,2,89,179,21
%N A378459 a(n) is the least k such that the concatenation of 2^n-1 and 2^k-1 is prime, or -1 if there is no such k.
%C A378459 a(n) is coprime to n, and is not divisible by 4.
%C A378459 a(1812) > 37000 if it is not -1.
%H A378459 Robert Israel, <a href="/A378459/b378459.txt">Table of n, a(n) for n = 1..1811</a>
%e A378459 a(7) = 3 because the concatenation of 2^7-1 = 127 and 2^3-1 = 7 is 1277 which is prime, and neither 1271 nor 1273 is prime.
%p A378459 tcat:= (a,b) -> 10^(1+ilog10(b))*a+b:
%p A378459 f:= proc(i) local x,j;
%p A378459     x:= 2^i-1;
%p A378459     for j from 1 by `if`(i::even,2,1) do
%p A378459      if j mod 4 = 0 or igcd(i,j) > 1 then next fi;
%p A378459      if isprime(tcat(x,2^j-1)) then return j fi;
%p A378459     od
%p A378459 end proc:
%p A378459 map(f, [$1..100]);
%t A378459 idf[a_]:=IntegerDigits[2^a-1];Table[k=0;Until[PrimeQ[FromDigits[Join[idf[n],idf[k]]]],k++];k,{n,86}] (* _James C. McMahon_, Dec 05 2024 *)
%Y A378459 First column of A378288.
%K A378459 nonn,base
%O A378459 1,7
%A A378459 _Robert Israel_, Nov 26 2024