%I #17 Sep 08 2022 08:45:39
%S 3,5,11,13,19,29,53,59,61,67,109,197,227,251,499,509,773,797,827,971,
%T 1013,1019,1021,1549,1987,2029,3083,3299,3323,4091,4093,4099,6163,
%U 8179,15413,16187,16381,28669,30781,31219,32707,32749,50123,62213,64709,64763
%N Irregular table with first row containing the single term 3; in the n-th row, n>=2, we list in increasing order those d=2^(n+1)-a, for each term a in all the preceding rows, such that d is prime.
%C Since primes above the n-th row are <2^n, primes in the n-th row are >2^(n+1)-2^n=2^n. Thus in different rows primes are different.
%C Questions: 1) Is every row nonempty? 2) Is the sequence infinite (an infinite number of nonempty rows)?
%H Jason Kimberley, <a href="/A152871/b152871.txt">Table of n, a(n) for n = 1..1016</a>
%e 1: 3;
%e 2: 5;
%e 3: 11, 13;
%e 4: 19, 29;
%e 5: 53, 59, 61;
%e 6: 67, 109;
%e 7: 197, 227, 251;
%e 8: 499, 509;
%e 9: 773, 797, 827, 971, 1013, 1019, 1021;
%o (Magma)
%o A152871and2 :=
%o function(N)
%o A := [[3]]; C := [1];
%o for n in [2..N] do
%o C[n] := 0;
%o A[n] := [];
%o for a in Reverse(&cat A) do
%o d := 2^(n+1) - a;
%o if
%o IsPrime(d)
%o then
%o Append(~A[n],d);
%o C[n] +:= 1;
%o end if;
%o end for;
%o end for;
%o return A, C;
%o end function;
%o A152871and2(20);
%Y The n-th row has length A152872(n).
%Y Cf. A152451.
%K nonn,easy,tabf
%O 1,1
%A _Vladimir Shevelev_, Dec 14 2008
%E Heavily edited by _Jason Kimberley_, Feb 12 2013