OFFSET
1,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 1..20000 (first 1000 terms from Harvey P. Dale)
FORMULA
For p an odd prime, a(p) = (p-1)/2. For nonnegative k, a(2^k) = 2^(k+1)-1.
Formula corrected by Nick Singer, Jun 26 2006
EXAMPLE
a(4) = 7 as 4*7 = 28 is a triangular number and 7 is the smallest such number.
MAPLE
isA000217 := proc(n)
issqr(1+8*n) ;
end proc:
A061782 := proc(n)
local a;
for a from 1 do
if isA000217(n*a) then
return a;
end if;
end do:
end proc:
seq(A061782(n), n=1..40) ; # R. J. Mathar, Oct 03 2014
MATHEMATICA
snt[n_]:=Module[{k=1}, While[!OddQ[Sqrt[1+8k n]], k++]; k]; Array[snt, 100] (* Harvey P. Dale, Feb 15 2017 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Amarnath Murthy, May 24 2001
EXTENSIONS
Corrected and extended by Matthew Conroy, May 28 2001
STATUS
approved