login
Let f(n) be the smallest prime == 1 mod n (cf. A034694). Sequence gives triangle T(j,k) = f^k(j) for 1 <= k <= j, read by rows.
3

%I #21 Sep 08 2022 08:45:10

%S 2,3,7,7,29,59,5,11,23,47,11,23,47,283,1699,7,29,59,709,2837,22697,29,

%T 59,709,2837,22697,590123,1180247,17,103,619,2477,34679,416149,

%U 7490683,29962733,19,191,383,4597,27583,330997,9267917,74143337,1038006719

%N Let f(n) be the smallest prime == 1 mod n (cf. A034694). Sequence gives triangle T(j,k) = f^k(j) for 1 <= k <= j, read by rows.

%C It has been proved in the reference that for every prime p there exists a prime of the form k*p+1. Conjecture: sequence is infinite, i.e., for every n there exists a prime of the form n*k+1 (cf. A034693).

%C Both follow directly from Dirichlet's theorem. [_Charles R Greathouse IV_, Feb 28 2012]

%D Amarnath Murthy, On the divisors of Smarandache Unary Sequence. Smarandache Notions Journal, Vol. 11, 2000.

%H Vincenzo Librandi, <a href="/A083809/b083809.txt">Table of n, a(n) for n = 1..591</a>

%e The first few rows of the triangle are

%e 2

%e 3 7

%e 7 29 59

%e 5 11 23 47

%e 11 23 47 283 1699

%e 7 29 59 709 2837 22697

%t f[1]=2; f[n_] := f[n] = Block[{p=2}, While[Mod[p, n] != 1, p = NextPrime[p]]; p];

%t Flatten[Table[Rest @ NestList[f, j, j], {j, 9}]]

%t (* _Jean-François Alcover_, May 31 2011, improved by _Robert G. Wilson v_ *)

%o (PARI 2.1.3) for(j=1,9,q=j; for(k=1,j,m=1; while(!isprime(p=m*q+1,1),m++); print1(q=p,",")))

%o (PARI) f(n)=my(k=n+1);while(!isprime(k),k+=n);k

%o T(j,k)=for(i=1,k,j=f(j));j \\ _Charles R Greathouse IV_, Feb 28 2012

%o (Magma) f:=function(n) m:=1; while not IsPrime(m*n+1) do m+:=1; end while; return m*n+1; end function; &cat[ [ k eq 1 select f(j) else f(Self(k-1)): k in [1..j] ]: j in [1..9] ]; // _Klaus Brockhaus_, May 30 2009

%Y The first column is given by A034694; the sequence of the last terms in the rows (main diagonal) is A083810. Row sums are in A160940.

%Y Cf. A034693.

%K nonn,tabl

%O 1,1

%A _Amarnath Murthy_, May 08 2003

%E Edited, corrected and extended by _Klaus Brockhaus_, May 13 2003