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.

A247024 Primes of the form x*(2^x - x) - 1.

This page as a plain text file.
%I A247024 #59 Sep 08 2022 08:46:09
%S A247024 3,47,347,10139,396527668833598369303619003,
%T A247024 1624796301562061610805093487,2637188343637273091841153207596203623407
%N A247024 Primes of the form x*(2^x - x) - 1.
%C A247024 Subsequence of A245014. a(n) represents the identity between (p + 4k^2 + 1) and (2n*4^k) for the least prime p defining A245014(k). Those first k where it occurs are: 1,2,3,5,41,42,62,183,357,407.
%C A247024 Consider the table of Stirling numbers of the second kind (A008277). The second column contains the numbers A000225, or 2^m - 1, and the first subdiagonal contains the triangular numbers. If a number appears in both sequences, we have the equation f(x) = 2^x - x^2 + x - 2 = 0 which has integer roots x = 1, 2, 3. Set g(x) = (x - 1)*(2^x - 1). Then it is found that the sum f(x) + g(x) for some even x defines this sequence and satisfies in common with A245014: Both sequences have three consecutive terms (those first) such that when they are represented in decimal the third term is the concatenation of the two terms preceding it.
%C A247024 Prime or PRP for x = 2, 4, 6, 10, 82, 84, 124, 366, 714, 814, 1584, 8938, 17812, 27054, 35380, 71358. - _Jens Kruse Andersen_, Sep 10 2014
%C A247024 The complete solution to the remark on Stirling2 numbers in a comment above is given in A076046. See also my Oct 08 2014 remark in the history. - _Wolfdieter Lang_, Oct 16 2014
%H A247024 R. J. Cano, <a href="/A247024/b247024.txt">Table of n, a(n) for n = 1..11</a>
%p A247024 A247024:=n->`if`(isprime(n*(2^n-n)-1),n*(2^n-n)-1,NULL): seq(A247024(n), n=1..10^2); # _Wesley Ivan Hurt_, Sep 13 2014
%t A247024 Select[Table[n(2^n - n) - 1, {n, 200}], PrimeQ] (* _Alonso del Arte_, Sep 09 2014 *)
%o A247024 (PARI) listToVec(l:list,Comp,Omega=#l)=vector(Omega,i,l[i][Comp]);
%o A247024 fplusg(x)=x*(2^x-x)-1;
%o A247024 find_next_N_terms(N,resumeFrom:list=List(),verbose=0)= {
%o A247024   my(s:list,q,j,F,N0);
%o A247024   s=resumeFrom;
%o A247024   q=#s;
%o A247024   N0=q;
%o A247024   if(q,j=s[q][1]);
%o A247024   while(q<N0+N,
%o A247024     j++;
%o A247024     F=fplusg(2*j);
%o A247024     if(isprime(F), q++;listput(s,[j,F]);if(verbose,print1(", ("j")")), if(verbose,print1(", "j)))
%o A247024   );
%o A247024   s
%o A247024 } /* This will keep a record of the terms and the x values
%o A247024      generating these primes through fplusg(2*x); For example use:
%o A247024           listToVec(find_next_N_terms(11),2);
%o A247024      in order to find the first 11 terms. */
%o A247024 (PFGW) ABC2 $a*(2^$a-$a)-1
%o A247024 a: from 2 to 100000 step 2
%o A247024 _Charles R Greathouse IV_, Sep 18 2014
%o A247024 (Magma) [a: x in [0..450] | IsPrime(a) where a is x*(2^x - x)-1]; // _Vincenzo Librandi_, Oct 16 2014
%Y A247024 Cf. A000225, A008277, A245014.
%K A247024 nonn
%O A247024 1,1
%A A247024 _R. J. Cano_, Sep 09 2014
%E A247024 Edited: 'penultimate column' replaced by 'first subdiagonal'. - _Wolfdieter Lang_, Oct 16 2014