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.

A144291 Triangular numbers n*(n-1)/2 with n and n -1 nonprime.

This page as a plain text file.
%I A144291 #10 Mar 27 2019 09:53:20
%S A144291 0,36,45,105,120,210,231,300,325,351,378,528,561,595,630,741,780,990,
%T A144291 1035,1176,1225,1275,1326,1485,1540,1596,1653,1953,2016,2080,2145,
%U A144291 2346,2415,2775,2850,2926,3003,3240,3321,3570,3655,3741,3828,4095,4186,4278
%N A144291 Triangular numbers n*(n-1)/2 with n and n -1 nonprime.
%H A144291 Robert Israel, <a href="/A144291/b144291.txt">Table of n, a(n) for n = 1..10000</a>
%F A144291 a(n) = A000217(A068780(n-1)), n>1. - _R. J. Mathar_, Dec 10 2008
%e A144291 If n=1, then 1*(1-1)/2=0=a(1).
%e A144291 If n=9, then 9*(9-1)/2=36=a(2).
%e A144291 etc.
%p A144291 p:= -1: Res:= NULL: count:= 0:
%p A144291 while count < 100 do
%p A144291   q:= p; p:= nextprime(p);
%p A144291   if p - q > 2 then
%p A144291     count:= count + p-q-2;
%p A144291     Res:= Res, seq(k*(k+1)/2, k=q+1..p-2);
%p A144291   fi
%p A144291 od:
%p A144291 Res; # _Robert Israel_, Jul 03 2018
%t A144291 Reap[For[n = 1, n <= 100, n++, If[!PrimeQ[n] && !PrimeQ[n-1], Sow[n(n-1)/2] ] ] ][[2, 1]] (* _Jean-François Alcover_, Mar 27 2019 *)
%Y A144291 Cf. A000040, A000217, A068780, A141468.
%K A144291 nonn
%O A144291 1,2
%A A144291 _Juri-Stepan Gerasimov_, Dec 01 2008
%E A144291 3570 inserted by _R. J. Mathar_, Dec 10 2008