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.

A231608 Table whose n-th row consists of primes p such that p + 2n is also prime, read by antidiagonals.

This page as a plain text file.
%I A231608 #17 Nov 19 2014 14:26:24
%S A231608 3,3,5,5,7,11,3,7,13,17,3,5,11,19,29,5,7,11,13,37,41,3,7,13,23,17,43,
%T A231608 59,3,5,11,19,29,23,67,71,5,7,17,17,31,53,31,79,101,3,11,13,23,19,37,
%U A231608 59,37,97,107,7,11,13,31,29,29,43,71,41,103,137
%N A231608 Table whose n-th row consists of primes p such that p + 2n is also prime, read by antidiagonals.
%H A231608 T. D. Noe, <a href="/A231608/b231608.txt">Rows n = 1..100 of triangle, flattened</a>
%e A231608 The following sequences are read by antidiagonals
%e A231608 {3, 5, 11, 17, 29, 41, 59, 71, 101, 107,...}
%e A231608 {3, 7, 13, 19, 37, 43, 67, 79, 97, 103,...}
%e A231608 {5, 7, 11, 13, 17, 23, 31, 37, 41, 47,...}
%e A231608 {3, 5, 11, 23, 29, 53, 59, 71, 89, 101,...}
%e A231608 {3, 7, 13, 19, 31, 37, 43, 61, 73, 79,...}
%e A231608 {5, 7, 11, 17, 19, 29, 31, 41, 47, 59,...}
%e A231608 {3, 5, 17, 23, 29, 47, 53, 59, 83, 89,...}
%e A231608 {3, 7, 13, 31, 37, 43, 67, 73, 97, 151,...}
%e A231608 {5, 11, 13, 19, 23, 29, 41, 43, 53, 61,...}
%e A231608 {3, 11, 17, 23, 41, 47, 53, 59, 83, 89,...}
%e A231608 ...
%p A231608 A231608 := proc(n,k)
%p A231608     local j,p ;
%p A231608     j := 0 ;
%p A231608     p := 2;
%p A231608     while j < k do
%p A231608         if isprime(p+2*n ) then
%p A231608             j := j+1 ;
%p A231608         end if;
%p A231608         if j = k then
%p A231608             return p;
%p A231608         end if;
%p A231608         p := nextprime(p) ;
%p A231608     end do:
%p A231608 end proc:
%p A231608 for n from 1 to 10 do
%p A231608     for k from 1 to 10 do
%p A231608         printf("%3d ",A231608(n,k)) ;
%p A231608     end do;
%p A231608     printf("\n") ;
%p A231608 end do: # _R. J. Mathar_, Nov 19 2014
%t A231608 nn = 10; t = Table[Select[Range[100*nn], PrimeQ[#] && PrimeQ[# + 2*n] &, nn], {n, nn}]; Table[t[[n-j+1, j]], {n, nn}, {j, n}]
%Y A231608 Cf. A001359, A023200, A023201, A023202, A023203.
%Y A231608 Cf. A046133, A153417, A049488, A153418, A153419.
%Y A231608 Cf. A020483 (numbers in first column).
%Y A231608 Cf. A086505 (numbers on the diagonal).
%K A231608 nonn,tabl
%O A231608 1,1
%A A231608 _T. D. Noe_, Nov 26 2013