login
Triangle read by rows: T(n,k) = prime(n) mod A001223(k), where A001223 are differences between consecutive primes.
2

%I #9 Jun 28 2024 21:10:41

%S 0,0,1,0,1,1,0,1,1,3,0,1,1,3,1,0,1,1,1,1,1,0,1,1,1,1,1,1,0,1,1,3,1,3,

%T 1,3,0,1,1,3,1,3,1,3,5,0,1,1,1,1,1,1,1,5,1,0,1,1,3,1,3,1,3,1,1,1,0,1,

%U 1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,5,1,5,1,1,0,1,1,3,1,3,1,3,1,1,1,3,1,3

%N Triangle read by rows: T(n,k) = prime(n) mod A001223(k), where A001223 are differences between consecutive primes.

%C The first prime gap is 3-2=1, so the first column is T(n,1)=0. The second and third prime gaps are 5-3=2 and 7-5=2, and since all primes > 2 are odd, T(n,2) = T(n,3) = 1.

%e Triangle begins:

%e 0;

%e 0,1;

%e 0,1,1;

%e 0,1,1,3;

%e 0,1,1,3,1;

%p A001223 := proc(n) ithprime(n+1)-ithprime(n) ; end proc:

%p A174433 := proc(n,k) ithprime(n) mod A001223(k) ; end proc:

%p seq(seq(A174433(n,k),k=1..n),n=1..14) ;

%Y Cf. A000040.

%K nonn,tabl

%O 1,10

%A _Juri-Stepan Gerasimov_, Nov 28 2010