login
Numbers n such that T(n) + S(n) + 1 is prime, where T(n) and S(n) are the n-th triangular and square numbers.
1

%I #10 Sep 24 2013 16:56:38

%S 1,5,8,9,12,17,21,24,29,32,41,44,45,53,56,57,60,68,69,77,81,84,89,92,

%T 96,108,113,117,120,132,144,149,156,164,185,197,200,201,212,213,224,

%U 233,236,248,252,260,264,269,281,288,300,312,317,321,324,329,344,353

%N Numbers n such that T(n) + S(n) + 1 is prime, where T(n) and S(n) are the n-th triangular and square numbers.

%H K. D. Bajpai, <a href="/A229469/b229469.txt">Table of n, a(n) for n = 1..10000</a>

%e a(4)=9: T(9)+S(9)+1= 9/2*(9+1)+9^2+1= 127 which is prime.

%e a(5)=12: T(12)+S(12)+1= 12/2*(12+1)+12^2+1= 223 which is prime.

%p KD:= proc() local a,b,c,d; a:= n/2*(n+1)+n^2+1; if isprime(a) then RETURN(n): fi; end: seq(KD(),n=1..5000);

%o (PARI) v=List(); for(n=1, 10^5, if(isprime(n/2*(n+1)+n^2+1), listput(v, n))); Vec(v)

%o (PARI) is(n)=isprime(n*(3*n+1)/2+1) \\ _Charles R Greathouse IV_, Sep 24 2013

%Y Cf. A228908, A229157.

%K nonn,easy

%O 1,2

%A _K. D. Bajpai_, Sep 24 2013