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.

A145032 If t(n) is the maximal triangular number not exceeding n, then a(n) is the n-th prime for which a(n)-t(a(n)) is a triangular number.

This page as a plain text file.
%I A145032 #6 Jul 22 2025 06:12:21
%S A145032 2,3,7,11,13,29,31,37,61,67,79,97,101,137,139,151,163,181,191,193,211,
%T A145032 241,263,277,331,379,409,421,463,499,571,601,631,709,739,751,769,821,
%U A145032 823,947,967,991,1063,1087,1091,1109,1117,1129,1231,1303,1327,1381,1399
%N A145032 If t(n) is the maximal triangular number not exceeding n, then a(n) is the n-th prime for which a(n)-t(a(n)) is a triangular number.
%C A145032 Primes p for which p-A057944(p) is in A000217. [From _R. J. Mathar_, Oct 25 2010]
%e A145032 E. g., t(181)=171 (see A000217) and 181-171=10 is triangular number. Therefore p=181 is in the sequence
%p A145032 Contribution from _R. J. Mathar_, Oct 25 2010: (Start)
%p A145032 A057944 := proc(n) for i from 0 do if i*(i+1)/2 > n then return (i-1)*i /2 ; end if; end do: end proc:
%p A145032 isA000217 := proc(n) issqr(8*n+1) ; end proc:
%p A145032 isA145032 := proc(p) if isprime(p) then tres := p-A057944(p) ; isA000217(tres) ; else false; end if; end proc:
%p A145032 for n from 1 to 400 do p := ithprime(n) ; if isA145032(p) then printf("%d,",p) ; end if; end do: (End)
%Y A145032 A000217 A117112 A145016
%K A145032 nonn
%O A145032 1,1
%A A145032 _Vladimir Shevelev_, Sep 30 2008
%E A145032 More terms from _R. J. Mathar_, Oct 25 2010