OFFSET
1,2
COMMENTS
Does the sequence contain all even numbers? - Giovanni Teofilatto, Apr 29 2010
MAPLE
From R. J. Mathar, Apr 30 2010: (Start)
A127949 := proc(n) if issqr(1+8*n) then (sqrt(1+8*n)-1)/2 ; else -1 ; end if; end proc:
A147846 := proc(n) option remember ; local k, a ; if n = 1 then 1; else for a from procname(n-1)+1 do k := A127949(a) ; if k > 0 then if isprime(k) or isprime(k+1) then return a; end if; end if; end do; end if; end proc:
for n from 1 to 400 do if isA176845(n) then printf("%d, ", n) ; end if; end do; (End)
CROSSREFS
KEYWORD
nonn
AUTHOR
Giovanni Teofilatto, Apr 27 2010
EXTENSIONS
Corrected (7 replaced by 8) and extended by R. J. Mathar, Apr 30 2010
STATUS
approved