OFFSET
1,1
COMMENTS
A subset of A000217. - R. J. Mathar, Apr 05 2007
MAPLE
isA000217 := proc(n) local t; t := (sqrt(1+8*n)-1)/2 ; type(t, 'integer'); end: A081974 := proc(nmax) local a, n, prodset; a := [1, 3] ; prodset := {3} ; while nops(a) < nmax do n := 2 ; while n in a or n*op(-1, a) in prodset or isA000217(n*op(-1, a)) = false do n := n+1 ; od ; prodset := prodset union { n*op(-1, a) } ; a := [op(a), n] ; od ; RETURN(a) ; end: A081975 := proc(nmax) local a ; a081974 := A081974(nmax) ; a := [] ; for i from 2 to nops(a081974) do a := [op(a), op(i, a081974)*op(i-1, a081974)] ; od ; RETURN(a) ; end: a := A081975(100) ; # R. J. Mathar, Apr 05 2007
MATHEMATICA
istriang[n_] := With[{x = Floor[Sqrt[2*n]]}, n == x*(x + 1)/2];
nmax = 47;
Clear[b, used, tris];
b[_] = 0; used[_] = 0; tris[_] = 0; b[1] = 1; used[1] = 1;
For[i = 2, i <= nmax+1, i++, f = b[i-1]; j = 2; While[used[j] == 1 || !istriang[f*j] || tris[f*j] == 1, j++]; b[i] = j; used[j] = 1; tris[f*j] = 1];
a[n_] := b[n]*b[n + 1];
Table[a[n], {n, 1, nmax}] (* Jean-François Alcover, May 23 2024, after PARI code in A081974 *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Amarnath Murthy, Apr 03 2003
EXTENSIONS
More terms from R. J. Mathar, Apr 05 2007
STATUS
approved