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.

A152871 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.

Original entry on oeis.org

3, 5, 11, 13, 19, 29, 53, 59, 61, 67, 109, 197, 227, 251, 499, 509, 773, 797, 827, 971, 1013, 1019, 1021, 1549, 1987, 2029, 3083, 3299, 3323, 4091, 4093, 4099, 6163, 8179, 15413, 16187, 16381, 28669, 30781, 31219, 32707, 32749, 50123, 62213, 64709, 64763
Offset: 1

Views

Author

Vladimir Shevelev, Dec 14 2008

Keywords

Comments

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.
Questions: 1) Is every row nonempty? 2) Is the sequence infinite (an infinite number of nonempty rows)?

Examples

			1: 3;
2: 5;
3: 11, 13;
4: 19, 29;
5: 53, 59, 61;
6: 67, 109;
7: 197, 227, 251;
8: 499, 509;
9: 773, 797, 827, 971, 1013, 1019, 1021;
		

Crossrefs

The n-th row has length A152872(n).
Cf. A152451.

Programs

  • Magma
    A152871and2 :=
        function(N)
            A := [[3]]; C := [1];
            for n in [2..N] do
                C[n] := 0;
                A[n] := [];
                for a in Reverse(&cat A) do
                    d := 2^(n+1) - a;
                    if
                        IsPrime(d)
                    then
                        Append(~A[n],d);
                        C[n] +:= 1;
                    end if;
                end for;
            end for;
            return A, C;
        end function;
    A152871and2(20);

Extensions

Heavily edited by Jason Kimberley, Feb 12 2013